mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 03:15:43 +08:00
Use delegate Vector2F class instead of Vector2
This commit is contained in:
@ -3,7 +3,7 @@ import 'package:flame/game.dart';
|
||||
import 'package:flame/time.dart';
|
||||
import 'package:flame/text_config.dart';
|
||||
import 'package:flame/gestures.dart';
|
||||
import 'package:flame/vector2.dart';
|
||||
import 'package:flame/vector2f.dart';
|
||||
import 'package:flame/components/timer_component.dart';
|
||||
|
||||
void main() {
|
||||
@ -42,7 +42,7 @@ class RenderedTimeComponent extends TimerComponent {
|
||||
textConfig.render(
|
||||
canvas,
|
||||
'Elapsed time: ${timer.current}',
|
||||
Vector2(10, 150),
|
||||
Vector2F(10, 150),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -90,8 +90,8 @@ class MyGame extends Game with TapDetector {
|
||||
textConfig.render(
|
||||
canvas,
|
||||
'Countdown: ${countdown.current}',
|
||||
Vector2(10, 100),
|
||||
Vector2F(10, 100),
|
||||
);
|
||||
textConfig.render(canvas, 'Elapsed time: $elapsedSecs', Vector2(10, 150));
|
||||
textConfig.render(canvas, 'Elapsed time: $elapsedSecs', Vector2F(10, 150));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user