Change spritesheet on jump

4 replies [Last post]
SamR's picture
SamR
User offline. Last seen 8 weeks 3 days ago. Offline
Joined: 12 May 2011

How do I go about changing the spritesheet when the object state changes?

e.g. when the player jumps - I want to use a different spritesheet.

Replies

carlos m. icaza's picture
carlos m. icaza
User offline. Last seen 6 weeks 5 days ago. Offline
Alumni
Joined: 22 Jun 2009

load both spritesheets into memory
when spritesheet1 one gets to position you want to change
stop animating it. hide it.
show spritesheet 2
animate it.

repeat lather rinse.

c.

peach pellen's picture
peach pellen
User offline. Last seen 1 day 12 hours ago. Offline
Staff
Joined: 12 Apr 2011

This tutorial may also help you, it doesn't cover a jump but does show a character walking in 4 directions with matching animations.

http://techority.com/2011/05/01/using-sprites-in-your-corona-iphone-application/

Peach :)

SamR's picture
SamR
User offline. Last seen 8 weeks 3 days ago. Offline
Joined: 12 May 2011

@peach pellen - Awesome tutorial!
Thanks!

SamR's picture
SamR
User offline. Last seen 8 weeks 3 days ago. Offline
Joined: 12 May 2011

@carlos - I'll give it a try, thanks.

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.