mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-01 19:12:31 +08:00
Never reset drift time
This commit is contained in:
committed by
Lukas Klingsbo
parent
b3615f1cac
commit
697a592c21
@ -55,7 +55,7 @@ abstract class ComponentEffect<T extends Component> {
|
||||
}
|
||||
if (isInfinite) {
|
||||
if ((!isAlternating && isMax()) || (isAlternating && isMin())) {
|
||||
reset(resetDriftTime = false);
|
||||
reset();
|
||||
}
|
||||
}
|
||||
if (!hasFinished()) {
|
||||
@ -86,12 +86,11 @@ abstract class ComponentEffect<T extends Component> {
|
||||
bool isMax() => percentage == null ? false : percentage == 1.0;
|
||||
bool isMin() => percentage == null ? false : percentage == 0.0;
|
||||
|
||||
void reset({bool resetDriftTime = true}) {
|
||||
void reset() {
|
||||
_isDisposed = false;
|
||||
percentage = null;
|
||||
currentTime = 0.0;
|
||||
curveDirection = 1;
|
||||
driftTime = resetDriftTime ? 0.0 : driftTime;
|
||||
isInfinite = _initialIsInfinite;
|
||||
isAlternating = _initialIsAlternating;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user