Fixes build (tests), adding ditance method to position, fix linting (formating, quotes), removed uneeded new keywords everywhere

This commit is contained in:
Luan Nico
2019-03-10 15:17:53 -03:00
parent ee429d2cd4
commit 9c69937b5b
35 changed files with 165 additions and 165 deletions

View File

@ -4,7 +4,7 @@ import 'package:flame/animation.dart' as FlameAnimation;
import 'package:flame/components/animation_component.dart';
import 'package:flutter/material.dart';
void main() => runApp(new MyGame().widget);
void main() => runApp(MyGame());
class MyGame extends BaseGame {
MyGame() {
@ -15,9 +15,7 @@ class MyGame extends BaseGame {
Size size = await Flame.util.initialDimensions();
final animation = await FlameAnimation.Animation.fromAsepriteData(
"chopper.png",
"chopper.json"
);
'chopper.png', 'chopper.json');
final animationComponent = AnimationComponent(200, 200, animation);
animationComponent.x = (size.width / 2) - 100;
@ -26,4 +24,3 @@ class MyGame extends BaseGame {
add(animationComponent);
}
}