Mercurial > touhou
diff pytouhou/game/enemy.pyx @ 471:06f0eeb519bb
Make Laser and Orb extension types, and use that where possible.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Mon, 16 Sep 2013 18:42:04 +0200 |
parents | feecdb4a8928 |
children | 2f53be1b2f60 |
line wrap: on
line diff
--- a/pytouhou/game/enemy.pyx +++ b/pytouhou/game/enemy.pyx @@ -17,7 +17,7 @@ from libc.math cimport cos, sin, atan2, from pytouhou.vm.anmrunner import ANMRunner from pytouhou.game.sprite import Sprite from pytouhou.game.bullet cimport Bullet, LAUNCHED -from pytouhou.game.laser import Laser +from pytouhou.game.laser cimport Laser, PlayerLaser from pytouhou.game.effect cimport Effect @@ -301,8 +301,9 @@ cdef class Enemy(Element): cdef void check_collisions(self): cdef Bullet bullet cdef Player player + cdef PlayerLaser laser cdef long damages - cdef double half_size[2], lx, ly, phalf_size + cdef double half_size[2], phalf_size # Check for collisions ex, ey = self.x, self.y