comparison gamelib/animations.py @ 233:d3d5352f5853

Twek speed loop. Document animation assumptions
author Neil Muller <drnlmuller@gmail.com>
date Sat, 05 Sep 2009 09:00:12 +0000
parents 3074784c93f4
children d0760fccce14
comparison
equal deleted inserted replaced
232:0bd214cf9018 233:d3d5352f5853
11 These are derived from sprites, since they behave similiary in most 11 These are derived from sprites, since they behave similiary in most
12 respects, but, to ensure draw ordering, we don't add them to 12 respects, but, to ensure draw ordering, we don't add them to
13 the sprites list. 13 the sprites list.
14 14
15 Ideally, animations should be quite short.""" 15 Ideally, animations should be quite short."""
16 # In the current implementation, sequences longer than 3 frames
17 # will cause issues as this will overrun the next move loop.
16 18
17 def __init__(self, sequence, tile_pos): 19 def __init__(self, sequence, tile_pos):
18 # Create the first frame 20 # Create the first frame
19 self.iter = iter(sequence) 21 self.iter = iter(sequence)
20 Sprite.__init__(self, self.iter.next(), (-1000, -1000)) 22 Sprite.__init__(self, self.iter.next(), (-1000, -1000))