mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 03:15:43 +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('with a complex widget tree and also'),
|
||||||
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:'),
|
||||||
|
|||||||
@ -155,8 +155,9 @@ class Util {
|
|||||||
/// This is intended to be used by non-game apps that want to add a sprite sheet animation.
|
/// 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) {
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user