Support line feed when create a sequenced animation from a single image source

This commit is contained in:
Liu Peng
2020-03-20 19:13:16 +08:00
parent 4ea67ca06b
commit afb4264107
2 changed files with 13 additions and 6 deletions

View File

@ -20,6 +20,7 @@ class AnimationComponent extends PositionComponent {
double height,
String imagePath,
int amount, {
int amountPerRow,
double textureX = 0.0,
double textureY = 0.0,
double textureWidth,
@ -33,6 +34,7 @@ class AnimationComponent extends PositionComponent {
animation = Animation.sequenced(
imagePath,
amount,
amountPerRow: amountPerRow,
textureX: textureX,
textureY: textureY,
textureWidth: textureWidth,