With the sort of new API, how do I fix spritesheets? #638
Replies: 5 comments
-
This post has been migrated automatically from the old LITIENGINE forum (2018 - 2022). |
Beta Was this translation helpful? Give feedback.
-
This post has been migrated automatically from the old LITIENGINE forum (2018 - 2022). If one is making a plat-former, is there a better way to do this or do you recommend another way? Also, in your tutorial, you mentioned that one only needed sprites that were left or right as the animation controller would flip them for us. How do you do that? |
Beta Was this translation helpful? Give feedback.
-
This post has been migrated automatically from the old LITIENGINE forum (2018 - 2022). |
Beta Was this translation helpful? Give feedback.
-
This post has been migrated automatically from the old LITIENGINE forum (2018 - 2022).
|
Beta Was this translation helpful? Give feedback.
-
This post has been migrated automatically from the old LITIENGINE forum (2018 - 2022).
|
Beta Was this translation helpful? Give feedback.
-
This post has been migrated automatically from the old LITIENGINE forum (2018 - 2022).
Posted: 2019-01-04 19:27:45
User: Dmartin42 [] (age: 1435 days 🔥; posts: 36)
My code is giving errors on the Spritesheet.find() method. How do I fix this with the new version of the engine?
public class Player1AnimationController extends EntityAnimationController<Player1> { public Player1AnimationController(Player1 player) { super(player, new Animation(Spritesheet.find("player_front"), true), getPlayerAnimations()); } private static Animation[] getPlayerAnimations () { ArrayList <Animation> animations = new ArrayList <Animation> (); animations.add(new Animation(Spritesheet.find("player_front"), true)); animations.add(new Animation(Spritesheet.find("player_back"), true)); animations.add(new Animation(Spritesheet.find("player_left"), true)); animations.add(new Animation(Spritesheet.find("player_right"), true)); return animations.toArray(new Animation[animations.size()]); } }
Is there a better way to do these things now?
Beta Was this translation helpful? Give feedback.
All reactions