So here is a little issue I’ve run in to.
The idea was to touch the screen and the players image would change.
So to start out we have something like;
player = display.newImage("rock.png")
But if we want to change the player’s image, there is really nothing in the API explaining how to do this easily.
What we are currently doing is having 3 player objects, and when we switch them, destroying one and creating a new one and passing all attributes (linear velocity, etc) over to the new object.
There must be an easier way to do this. Any tips?
The only thing that comes to mind is using a sprite sheet, and it has like a event.next command when you change the image? Could that work? To be honest, never used it before. [import]uid: 81846 topic_id: 16154 reply_id: 316154[/import]
[import]uid: 3826 topic_id: 16154 reply_id: 60175[/import]