Mercurial > touhou
diff pytouhou/game/bullet.pxd @ 442:6b4c3e250bd6
Type Bullet more, to improve performances.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 10 Aug 2013 15:21:39 +0200 |
parents | |
children | 78e1c3864e73 |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/pytouhou/game/bullet.pxd @@ -0,0 +1,19 @@ +from pytouhou.game.element cimport Element +from pytouhou.utils.interpolator cimport Interpolator + +cdef class Bullet(Element): + cdef public unsigned long state, 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, _game, _bullet_type + cdef public tuple hitbox + cdef public list attributes + + cdef Interpolator speed_interpolator + + cdef bint is_visible(self, unsigned int screen_width, unsigned int screen_height) + cpdef set_anim(self, sprite_idx_offset=*) + cdef void launch(self) + cpdef collide(self) + cpdef cancel(self) + cpdef update(self)