PR suggestions

This commit is contained in:
Erick Zanardo
2019-07-02 22:41:36 -03:00
parent cb42631dab
commit 34e7fb314e
4 changed files with 21 additions and 24 deletions

View File

@ -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);
}