mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 20:13:50 +08:00
Explicitly set what the effect modifies (#585)
* Explicitly set what the effect modifies * Add changelog entry
This commit is contained in:
@ -15,7 +15,14 @@ class SequenceEffect extends PositionComponentEffect {
|
||||
bool isInfinite = false,
|
||||
bool isAlternating = false,
|
||||
void Function() onComplete,
|
||||
}) : super(isInfinite, isAlternating, onComplete: onComplete) {
|
||||
}) : super(
|
||||
isInfinite,
|
||||
isAlternating,
|
||||
modifiesPosition: effects.any((e) => e.modifiesPosition),
|
||||
modifiesAngle: effects.any((e) => e.modifiesAngle),
|
||||
modifiesSize: effects.any((e) => e.modifiesSize),
|
||||
onComplete: onComplete,
|
||||
) {
|
||||
assert(
|
||||
effects.every((effect) => effect.component == null),
|
||||
'Each effect can only be added once',
|
||||
|
||||
Reference in New Issue
Block a user