mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-04 04:47:13 +08:00
Fix formatting
This commit is contained in:
@ -39,10 +39,10 @@ abstract class PositionComponentEffect {
|
|||||||
double get totalTravelTime => travelTime * (isAlternating ? 2 : 1);
|
double get totalTravelTime => travelTime * (isAlternating ? 2 : 1);
|
||||||
|
|
||||||
PositionComponentEffect(
|
PositionComponentEffect(
|
||||||
this._initialIsInfinite,
|
this._initialIsInfinite,
|
||||||
this._initialIsAlternating, {
|
this._initialIsAlternating, {
|
||||||
this.onComplete,
|
this.onComplete,
|
||||||
}) {
|
}) {
|
||||||
isInfinite = _initialIsInfinite;
|
isInfinite = _initialIsInfinite;
|
||||||
isAlternating = _initialIsAlternating;
|
isAlternating = _initialIsAlternating;
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@ abstract class PositionComponentEffect {
|
|||||||
if (!hasFinished()) {
|
if (!hasFinished()) {
|
||||||
currentTime += dt * curveDirection + driftTime * driftMultiplier;
|
currentTime += dt * curveDirection + driftTime * driftMultiplier;
|
||||||
percentage = min(1.0, max(0.0, currentTime / travelTime));
|
percentage = min(1.0, max(0.0, currentTime / travelTime));
|
||||||
if (hasFinished()){
|
if (hasFinished()) {
|
||||||
onComplete?.call();
|
onComplete?.call();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,14 +22,14 @@ class MoveEffect extends PositionComponentEffect {
|
|||||||
double _yDistance;
|
double _yDistance;
|
||||||
double _yDirection;
|
double _yDirection;
|
||||||
|
|
||||||
MoveEffect({
|
MoveEffect(
|
||||||
@required this.destination,
|
{@required this.destination,
|
||||||
@required this.speed,
|
@required this.speed,
|
||||||
this.curve,
|
this.curve,
|
||||||
isInfinite = false,
|
isInfinite = false,
|
||||||
isAlternating = false,
|
isAlternating = false,
|
||||||
Function onComplete
|
Function onComplete})
|
||||||
}) : super(isInfinite, isAlternating, onComplete: onComplete);
|
: super(isInfinite, isAlternating, onComplete: onComplete);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initialize(_comp) {
|
void initialize(_comp) {
|
||||||
|
|||||||
Reference in New Issue
Block a user