[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] I can't seem to find any simple sprite animation game examples on the pygame.org site
Okay thanks sounds like a plan.
On 9/11/07, Ian Mallett <geometrian@xxxxxxxxx> wrote:
Opps. That's:
if frame_number%10 == 0: #frame_number is a multiple of ten
#draw frame 1
elif frame_number%9 == 0: #frame_number ends in 9
#draw frame 2
elif frame_number%8 == 0: #frame_number ends in 8
#draw frame 3
elif frame_number%7 == 0: #frame_number ends in 7
#draw frame 4
elif frame_number%6 == 0: #frame_number ends in 6
#draw frame 5
elif frame_number%5 == 0: #frame_number ends in 5
#draw frame 6
elif frame_number%4 == 0: #frame_number ends in 4
#draw frame 7
elif frame_number%3 == 0: #frame_number ends in 3
#draw frame 8
elif frame_number%2 == 0: #frame_number ends in 2
#draw frame 9
else: #frame_number ends in 1
#draw frame 10
Ian