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