mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 11:43:19 +08:00
Correct super update order
This commit is contained in:
@ -49,13 +49,12 @@ class MoveEffect extends PositionComponentEffect {
|
||||
|
||||
@override
|
||||
void update(double dt) {
|
||||
super.update(dt);
|
||||
|
||||
if (!hasFinished()) {
|
||||
final double c = curve?.transform(percentage) ?? 1.0;
|
||||
|
||||
component.x = _xOriginal + _xDistance * c * _xDirection;
|
||||
component.y = _yOriginal + _yDistance * c * _yDirection;
|
||||
}
|
||||
super.update(dt);
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,12 +46,12 @@ class ScaleEffect extends PositionComponentEffect {
|
||||
|
||||
@override
|
||||
void update(double dt) {
|
||||
super.update(dt);
|
||||
if (!hasFinished()) {
|
||||
final double c = curve?.transform(percentage) ?? 1.0;
|
||||
|
||||
component.width = _original.width + _diff.width * c * _dir.x;
|
||||
component.height = _original.height + _diff.height * c * _dir.y;
|
||||
}
|
||||
super.update(dt);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user