mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-01 19:12:31 +08:00
PR suggestions
This commit is contained in:
@ -10,9 +10,8 @@ void main() async{
|
||||
}
|
||||
|
||||
class MyGame extends BaseGame {
|
||||
Size screenSize;
|
||||
|
||||
MyGame(this.screenSize) {
|
||||
MyGame(Size screenSize) {
|
||||
size = screenSize;
|
||||
_start();
|
||||
}
|
||||
|
||||
@ -21,8 +20,8 @@ class MyGame extends BaseGame {
|
||||
'chopper.png', 'chopper.json');
|
||||
final animationComponent = AnimationComponent(200, 200, animation);
|
||||
|
||||
animationComponent.x = (screenSize.width / 2) - 100;
|
||||
animationComponent.y = (screenSize.height / 2) - 100;
|
||||
animationComponent.x = (size.width / 2) - 100;
|
||||
animationComponent.y = (size.height / 2) - 100;
|
||||
|
||||
add(animationComponent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user