comparison pytouhou/game/laser.pxd @ 472:8038f1957b71

Type bullettype, itemtype and lasertype a bit.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Mon, 16 Sep 2013 18:42:04 +0200
parents 06f0eeb519bb
children b32cef75df59
comparison
equal deleted inserted replaced
471:06f0eeb519bb 472:8038f1957b71
1 from pytouhou.game.element cimport Element 1 from pytouhou.game.element cimport Element
2 from pytouhou.game.sprite cimport Sprite 2 from pytouhou.game.sprite cimport Sprite
3 from pytouhou.game.game cimport Game 3 from pytouhou.game.game cimport Game
4 from pytouhou.game.lasertype cimport LaserType
4 5
5 cdef enum State: 6 cdef enum State:
6 STARTING, STARTED, STOPPING 7 STARTING, STARTED, STOPPING
7 8
8 9
19 cdef unsigned long start_duration, duration, stop_duration, grazing_delay, 20 cdef unsigned long start_duration, duration, stop_duration, grazing_delay,
20 cdef unsigned long grazing_extra_duration, sprite_idx_offset 21 cdef unsigned long grazing_extra_duration, sprite_idx_offset
21 cdef double base_pos[2], speed, start_offset, end_offset, max_length, width 22 cdef double base_pos[2], speed, start_offset, end_offset, max_length, width
22 cdef State state 23 cdef State state
23 cdef Game _game 24 cdef Game _game
24 cdef object _laser_type 25 cdef LaserType _laser_type
25 26
26 cdef void set_anim(self, long sprite_idx_offset=*) except * 27 cdef void set_anim(self, long sprite_idx_offset=*) except *
27 cpdef set_base_pos(self, double x, double y) 28 cpdef set_base_pos(self, double x, double y)
28 cdef bint _check_collision(self, double point[2], double border_size) 29 cdef bint _check_collision(self, double point[2], double border_size)
29 cdef bint check_collision(self, double point[2]) 30 cdef bint check_collision(self, double point[2])
35 36
36 cdef class PlayerLaser(Element): 37 cdef class PlayerLaser(Element):
37 cdef double hitbox[2], angle, offset 38 cdef double hitbox[2], angle, offset
38 cdef unsigned long frame, duration, sprite_idx_offset, damage 39 cdef unsigned long frame, duration, sprite_idx_offset, damage
39 cdef Element origin 40 cdef Element origin
40 cdef object _laser_type 41 cdef LaserType _laser_type
41 42
42 cdef void set_anim(self, long sprite_idx_offset=*) except * 43 cdef void set_anim(self, long sprite_idx_offset=*) except *
43 cdef void cancel(self) except * 44 cdef void cancel(self) except *
44 cdef void update(self) except * 45 cdef void update(self) except *