SizeEffect.by constructor
SizeEffect.by(
- Vector2 offset,
- EffectController controller, {
- SizeProvider? target,
- void onComplete()?,
- ComponentKey? key,
This constructor will create an effect that sets the size in relation to
the PositionComponent's current size, for example if the offset is
set to Vector2(10, -10) and the size of the affected component is
Vector2(100, 100) at the start of the affected the effect will peak when
the size is Vector2(110, 90), if there is nothing else affecting the
size at the same time.
Implementation
SizeEffect.by(
Vector2 offset,
super.controller, {
SizeProvider? target,
super.onComplete,
super.key,
}) : _offset = offset.clone() {
this.target = target;
}