mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-01 10:38:17 +08:00
Updating dashbook and adding an example with info (#779)
This commit is contained in:
@ -5,17 +5,14 @@ import 'package:flame/game.dart';
|
||||
import 'package:flame/gestures.dart';
|
||||
|
||||
class BasicAnimations extends BaseGame with TapDetector {
|
||||
late Image chopper;
|
||||
late Image creature;
|
||||
late SpriteAnimation animation;
|
||||
|
||||
@override
|
||||
Future<void> onLoad() async {
|
||||
chopper = await images.load('animations/chopper.png');
|
||||
creature = await images.load('animations/creature.png');
|
||||
|
||||
animation = SpriteAnimation.fromFrameData(
|
||||
chopper,
|
||||
final animation = await loadSpriteAnimation(
|
||||
'animations/chopper.png',
|
||||
SpriteAnimationData.sequenced(
|
||||
amount: 4,
|
||||
textureSize: Vector2.all(48),
|
||||
|
||||
Reference in New Issue
Block a user