diff pytouhou/game/bullet.pxd @ 448:3bc37791f0a2

Make Bullet.state an enum.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 17 Aug 2013 17:44:11 +0200
parents 78e1c3864e73
children feecdb4a8928
line wrap: on
line diff
--- a/pytouhou/game/bullet.pxd
+++ b/pytouhou/game/bullet.pxd
@@ -2,8 +2,14 @@ from pytouhou.game.element cimport Eleme
 from pytouhou.game.game cimport Game
 from pytouhou.utils.interpolator cimport Interpolator
 
+
+cdef enum State:
+    LAUNCHING, LAUNCHED, CANCELLED
+
+
 cdef class Bullet(Element):
-    cdef public unsigned long state, flags, frame, sprite_idx_offset, damage
+    cdef public State state
+    cdef public unsigned long flags, frame, sprite_idx_offset, damage
     cdef public double dx, dy, angle, speed
     cdef public bint player_bullet, was_visible, grazed
     cdef public object target, _bullet_type