Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How to use a series of sprites to make it look like someone is walking
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ZZK




PostPosted: Sat Dec 18, 2010 11:17 am   Post subject: How to use a series of sprites to make it look like someone is walking

For my game, i need to make mario walk, i have found 8 images that make it look like Mario is walking. I know i need to make a array, but i dont know how to impletment it and i don't know how to use the array as well as the boolean, or the counter that i need.
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Sat Dec 18, 2010 12:29 pm   Post subject: RE:How to use a series of sprites to make it look like someone is walking

Well, load the images in an array. Keep a counter incrementing in the loop. Every time you Sprite.Animate(), change the image to the one at array[counter]. Once you get to the last image (7), reset counter to 0. Repeat.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: