Updating dashbook and adding an example with info (#779)

This commit is contained in:
Erick
2021-05-03 09:12:50 -03:00
committed by GitHub
parent 0cb64fb57f
commit b65bac8aed
3 changed files with 35 additions and 7 deletions

View File

@ -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),