diff --git a/doc/effects.md b/doc/effects.md index 765418f9f..fa8045494 100644 --- a/doc/effects.md +++ b/doc/effects.md @@ -72,7 +72,7 @@ This effect is a combination of other effects. You provide it with a list of you The effects in the list should only be passed to the SequenceEffect, never added to a PositionComponent with `addEffect`. -Note that no effects added to the sequence can have their `isInfinite` property set to `true`, because then naturally the sequence will get stuck once it gets to that effect. +Note that no effect (except the last) added to the sequence should have their `isInfinite` property set to `true`, because then naturally the sequence will get stuck once it gets to that effect. You can make the sequence go in a loop by setting both `isInfinite: true` and `isAlternating: true`. diff --git a/lib/effects/sequence_effect.dart b/lib/effects/sequence_effect.dart index a8a75a709..27328c859 100644 --- a/lib/effects/sequence_effect.dart +++ b/lib/effects/sequence_effect.dart @@ -15,9 +15,6 @@ class SequenceEffect extends PositionComponentEffect { isInfinite = false, isAlternating = false, }) : super(isInfinite, isAlternating) { - /// All effects need to be finite, otherwise the sequence will get stuck - assert(effects.every((effect) => !effect.isInfinite)); - /// No effects can be added to components from the start assert(effects.every((effect) => effect.component == null)); }