diff pytouhou/game/laser.py @ 384:690b5faaa0e6

Make rendering of multiple-sprites elements work like single-sprites.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 02 Oct 2012 13:27:05 +0200
parents 14c9aca8e274
children b11953cf1d3b
line wrap: on
line diff
--- a/pytouhou/game/laser.py
+++ b/pytouhou/game/laser.py
@@ -28,6 +28,7 @@ class LaserLaunchAnim(object):
         self.sprite.anm, self.sprite.texcoords = anm_wrapper.get_sprite(index)
         self.sprite.blendfunc = 1
         self.removed = False
+        self.objects = [self]
         self.x, self.y = 0, 0
 
 
@@ -65,6 +66,7 @@ class Laser(object):
         self.sprite = None
         self.anmrunner = None
         self.removed = False
+        self.objects = [self]
 
         #TODO: hitbox
 
@@ -201,6 +203,7 @@ class PlayerLaser(object):
         self.removed = False
         self._laser_type = laser_type
         self.origin = origin
+        self.objects = [self]
 
         self.hitbox_half_size = hitbox[0] / 2., hitbox[1] / 2.