diff pytouhou/game/item.pxd @ 446:3a33ed7f3b85

Make pytouhou.game.item an extension type.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 17 Aug 2013 06:01:45 +0200
parents
children 78e1c3864e73
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/pytouhou/game/item.pxd
@@ -0,0 +1,25 @@
+from pytouhou.game.element cimport Element
+from pytouhou.game.player cimport Player
+from pytouhou.utils.interpolator cimport Interpolator
+
+
+cdef class Indicator(Element):
+    cdef Item _item
+
+    cpdef update(self)
+
+
+cdef class Item(Element):
+    cdef public object _item_type
+
+    cdef object _game
+    cdef unsigned long frame
+    cdef long _type
+    cdef double angle, speed
+    cdef Player player
+    cdef Indicator indicator
+    cdef Interpolator speed_interpolator, pos_interpolator
+
+    cpdef autocollect(self, Player player)
+    cpdef on_collect(self, Player player)
+    cpdef update(self)