comparison pytouhou/game/laser.pyx @ 527:db28538cd399

Use Sprite C arrays instead of their tuple representation where it makes sense.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 18 Dec 2013 18:19:08 +0100
parents b32cef75df59
children 53fa73932e9a
comparison
equal deleted inserted replaced
526:0b2a92a25245 527:db28538cd399
37 37
38 self.x = laser.base_pos[0] + offset * dx 38 self.x = laser.base_pos[0] + offset * dx
39 self.y = laser.base_pos[1] + offset * dy 39 self.y = laser.base_pos[1] + offset * dy
40 40
41 scale = laser.width / 10. - (offset - laser.start_offset) #TODO: check 41 scale = laser.width / 10. - (offset - laser.start_offset) #TODO: check
42 self.sprite.rescale = (scale, scale) 42 self.sprite._rescale[:] = [scale, scale]
43 self.sprite.changed = True 43 self.sprite.changed = True
44 44
45 if laser.removed or scale <= 0.: 45 if laser.removed or scale <= 0.:
46 self.removed = True 46 self.removed = True
47 47