mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-01 10:38:17 +08:00
fix commas
This commit is contained in:
@ -70,9 +70,14 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
const Text('with a complex widget tree and also'),
|
||||
const Text('some pretty sprite sheet animations :)'),
|
||||
Flame.util.animationAsWidget(
|
||||
_position,
|
||||
animation.Animation.sequenced('minotaur.png', 19,
|
||||
textureWidth: 96.0, textureHeight: 96)),
|
||||
_position,
|
||||
animation.Animation.sequenced(
|
||||
'minotaur.png',
|
||||
19,
|
||||
textureWidth: 96.0,
|
||||
textureHeight: 96,
|
||||
),
|
||||
),
|
||||
const Text('Neat, hum?'),
|
||||
const Text(
|
||||
'By the way, you can also use static sprites as widgets:'),
|
||||
|
||||
@ -155,8 +155,9 @@ class Util {
|
||||
/// This is intended to be used by non-game apps that want to add a sprite sheet animation.
|
||||
widgets.Widget animationAsWidget(Position size, Animation animation) {
|
||||
return EmbeddedGameWidget(
|
||||
BaseGame()..add(AnimationComponent(size.x, size.y, animation)),
|
||||
size: size);
|
||||
BaseGame()..add(AnimationComponent(size.x, size.y, animation)),
|
||||
size: size,
|
||||
);
|
||||
}
|
||||
|
||||
/// Returns a regular Flutter widget representing this sprite, rendered with the specified size.
|
||||
|
||||
Reference in New Issue
Block a user