mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 11:43:19 +08:00
Fixes build (tests), adding ditance method to position, fix linting (formating, quotes), removed uneeded new keywords everywhere
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user