mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-01 10:38:17 +08:00
Fix formatting
This commit is contained in:
@ -15,15 +15,15 @@ class Callback {
|
||||
}
|
||||
|
||||
void effectTest(
|
||||
WidgetTester tester,
|
||||
PositionComponent component,
|
||||
PositionComponentEffect effect, {
|
||||
bool hasFinished = true,
|
||||
double iterations = 1.0,
|
||||
double expectedAngle = 0.0,
|
||||
Vector2 expectedPosition,
|
||||
Vector2 expectedSize,
|
||||
}) async {
|
||||
WidgetTester tester,
|
||||
PositionComponent component,
|
||||
PositionComponentEffect effect, {
|
||||
bool hasFinished = true,
|
||||
double iterations = 1.0,
|
||||
double expectedAngle = 0.0,
|
||||
Vector2 expectedPosition,
|
||||
Vector2 expectedSize,
|
||||
}) async {
|
||||
expectedPosition ??= Vector2.zero();
|
||||
expectedSize ??= Vector2.all(100.0);
|
||||
final Callback callback = Callback();
|
||||
@ -34,7 +34,7 @@ void effectTest(
|
||||
final double duration = effect.totalTravelTime;
|
||||
await tester.pumpWidget(game.widget);
|
||||
double timeLeft = iterations * duration;
|
||||
while(timeLeft > 0) {
|
||||
while (timeLeft > 0) {
|
||||
final double stepDelta = random.nextInt(100) / 1000;
|
||||
game.update(stepDelta);
|
||||
timeLeft -= stepDelta;
|
||||
|
||||
Reference in New Issue
Block a user