fix commas

This commit is contained in:
Erlend Fagerheim
2020-04-23 18:10:36 +02:00
parent 21f0cb769f
commit c535ba6a2f
2 changed files with 11 additions and 5 deletions

View File

@ -71,8 +71,13 @@ class _MyHomePageState extends State<MyHomePage> {
const Text('some pretty sprite sheet animations :)'), const Text('some pretty sprite sheet animations :)'),
Flame.util.animationAsWidget( Flame.util.animationAsWidget(
_position, _position,
animation.Animation.sequenced('minotaur.png', 19, animation.Animation.sequenced(
textureWidth: 96.0, textureHeight: 96)), 'minotaur.png',
19,
textureWidth: 96.0,
textureHeight: 96,
),
),
const Text('Neat, hum?'), const Text('Neat, hum?'),
const Text( const Text(
'By the way, you can also use static sprites as widgets:'), 'By the way, you can also use static sprites as widgets:'),

View File

@ -156,7 +156,8 @@ class Util {
widgets.Widget animationAsWidget(Position size, Animation animation) { widgets.Widget animationAsWidget(Position size, Animation animation) {
return EmbeddedGameWidget( return EmbeddedGameWidget(
BaseGame()..add(AnimationComponent(size.x, size.y, animation)), BaseGame()..add(AnimationComponent(size.x, size.y, animation)),
size: size); size: size,
);
} }
/// Returns a regular Flutter widget representing this sprite, rendered with the specified size. /// Returns a regular Flutter widget representing this sprite, rendered with the specified size.