diff pytouhou/game/effect.py @ 440:b9d2db93972f

Add a base Element class for every object in pytouhou.game.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 30 Aug 2013 14:16:08 +0200
parents 1222341ea22c
children
line wrap: on
line diff
--- a/pytouhou/game/effect.py
+++ b/pytouhou/game/effect.py
@@ -13,20 +13,18 @@
 ##
 
 
+from pytouhou.game.element import Element
 from pytouhou.game.sprite import Sprite
 from pytouhou.vm.anmrunner import ANMRunner
 from pytouhou.utils.interpolator import Interpolator
 
 
 
-class Effect(object):
+class Effect(Element):
     def __init__(self, pos, index, anm):
+        Element.__init__(self, pos)
         self.sprite = Sprite()
         self.anmrunner = ANMRunner(anm, index, self.sprite)
-        self.removed = False
-        self.objects = [self]
-
-        self.x, self.y = pos
 
 
     def update(self):