This site requires JavaScript, please enable it in your browser!
Greenfoot back
dlanni
dlanni wrote ...

2012/5/13

Array List

dlanni dlanni

2012/5/13

#
Are there any simple examples of using array lists for animating characters? I remember something like this: Array<Animation> , where you could reuse the same images. If you wanted to do a walking animation you could make a list image1, image2, image3, image2 and then repeat and also mirror horizontally for walking in opposite direction instead of using 8 images in a regular array. I am having trouble finding the basic formula for this.
danpost danpost

2012/5/14

#
There is no problem with re-using an image in a standard array; and you can program the mirror horizontally in, depending on the direction the actor is moving. See my post on the other thread 'Animation problems'.
dlanni dlanni

2012/5/14

#
Thanks Dan.
You need to login to post a reply.