Mercurial > touhou
comparison pytouhou/game/enemy.pxd @ 497:3da7395f39e3
Make enemy callbacks programmables.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Mon, 14 Oct 2013 12:20:55 +0200 |
parents | feecdb4a8928 |
children | 292fea5c584e |
comparison
equal
deleted
inserted
replaced
496:104c737ce8b3 | 497:3da7395f39e3 |
---|---|
1 from pytouhou.game.element cimport Element | 1 from pytouhou.game.element cimport Element |
2 from pytouhou.game.game cimport Game | 2 from pytouhou.game.game cimport Game |
3 from pytouhou.game.player cimport Player | 3 from pytouhou.game.player cimport Player |
4 from pytouhou.utils.interpolator cimport Interpolator | 4 from pytouhou.utils.interpolator cimport Interpolator |
5 | 5 |
6 cdef class Callback: | |
7 cdef function | |
8 cdef public tuple args # XXX: public only for ECL’s copy_callbacks. | |
9 | |
10 cpdef enable(self, function, tuple args) | |
11 cpdef disable(self) | |
12 cpdef fire(self) | |
13 | |
6 cdef class Enemy(Element): | 14 cdef class Enemy(Element): |
7 cdef public double z, angle, speed, rotation_speed, acceleration | 15 cdef public double z, angle, speed, rotation_speed, acceleration |
8 cdef public long _type, bonus_dropped, die_score, frame, life, death_flags, current_laser_id, death_callback, boss_callback, low_life_callback, low_life_trigger, timeout, timeout_callback, remaining_lives, bullet_launch_interval, bullet_launch_timer, death_anim, direction, update_mode | 16 cdef public long _type, bonus_dropped, die_score, frame, life, death_flags, current_laser_id, low_life_trigger, timeout, remaining_lives, bullet_launch_interval, bullet_launch_timer, death_anim, direction, update_mode |
9 cdef public bint visible, was_visible, touchable, collidable, damageable, boss, automatic_orientation, delay_attack | 17 cdef public bint visible, was_visible, touchable, collidable, damageable, boss, automatic_orientation, delay_attack |
10 cdef public tuple difficulty_coeffs, extended_bullet_attributes, bullet_attributes, bullet_launch_offset, movement_dependant_sprites, screen_box | 18 cdef public tuple difficulty_coeffs, extended_bullet_attributes, bullet_attributes, bullet_launch_offset, movement_dependant_sprites, screen_box |
19 cdef public Callback death_callback, boss_callback, low_life_callback, timeout_callback | |
11 cdef public dict laser_by_id | 20 cdef public dict laser_by_id |
12 cdef public list aux_anm | 21 cdef public list aux_anm |
13 cdef public Interpolator interpolator, speed_interpolator | 22 cdef public Interpolator interpolator, speed_interpolator |
14 cdef public object _anms, process | 23 cdef public object _anms, process |
15 | 24 |