mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 11:43:19 +08:00
increasing example size
This commit is contained in:
@ -14,11 +14,14 @@ class MyGame extends BaseGame {
|
||||
_start() async {
|
||||
Size size = await Flame.util.initialDimensions();
|
||||
|
||||
final animation = await FlameAnimation.Animation.fromAsepriteData("chopper.png", "./assets/chopper.json");
|
||||
final animationComponent = AnimationComponent(100, 100, animation);
|
||||
final animation = await FlameAnimation.Animation.fromAsepriteData(
|
||||
"chopper.png",
|
||||
"./assets/chopper.json"
|
||||
);
|
||||
final animationComponent = AnimationComponent(200, 200, animation);
|
||||
|
||||
animationComponent.x = (size.width / 2) - 50;
|
||||
animationComponent.y = (size.height / 2) - 50;
|
||||
animationComponent.x = (size.width / 2) - 100;
|
||||
animationComponent.y = (size.height / 2) - 100;
|
||||
|
||||
add(animationComponent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user