diff pytouhou/game/orb.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 06f0eeb519bb
line wrap: on
line diff
--- a/pytouhou/game/orb.py
+++ b/pytouhou/game/orb.py
@@ -13,15 +13,17 @@
 ##
 
 
+from pytouhou.game.element import Element
 from pytouhou.game.sprite import Sprite
 from pytouhou.vm.anmrunner import ANMRunner
 
 
-class Orb(object):
-    __slots__ = ('sprite', 'anmrunner', 'offset_x', 'offset_y', 'player_state',
-                 'fire')
+class Orb(Element):
+    __slots__ = ('offset_x', 'offset_y', 'player_state', 'fire')
 
     def __init__(self, anm, index, player_state, fire_func):
+        Element.__init__(self)
+
         self.sprite = Sprite()
         self.anmrunner = ANMRunner(anm, index, self.sprite)