diff pytouhou/game/enemy.pxd @ 447:78e1c3864e73

Make pytouhou.game.game an extension type.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 17 Aug 2013 06:29:53 +0200
parents e8dc95a2a287
children feecdb4a8928
line wrap: on
line diff
--- a/pytouhou/game/enemy.pxd
+++ b/pytouhou/game/enemy.pxd
@@ -1,4 +1,5 @@
 from pytouhou.game.element cimport Element
+from pytouhou.game.game cimport Game
 from pytouhou.utils.interpolator cimport Interpolator
 
 cdef class Enemy(Element):
@@ -9,8 +10,9 @@ cdef class Enemy(Element):
     cdef public dict laser_by_id
     cdef public list aux_anm
     cdef public Interpolator interpolator, speed_interpolator
-    cdef public object _game, _anms, process
+    cdef public object _anms, process
 
+    cdef Game _game
     cdef double[2] hitbox_half_size
 
     cpdef play_sound(self, index)
@@ -34,7 +36,7 @@ cdef class Enemy(Element):
     cpdef set_pos(self, x, y, z)
     cpdef move_to(self, duration, x, y, z, formula)
     cpdef stop_in(self, duration, formula)
-    cpdef bint is_visible(self, long screen_width, long screen_height)
+    cdef bint is_visible(self, long screen_width, long screen_height)
     cdef void check_collisions(self)
     cdef void handle_callbacks(self)
     cpdef update(self)