Mercurial > touhou
annotate pytouhou/game/enemy.pxd @ 441:e8dc95a2a287
Make pytouhou.game.enemy an extension type.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 10 Aug 2013 19:59:17 +0200 |
parents | |
children | 78e1c3864e73 |
rev | line source |
---|---|
441
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
1 from pytouhou.game.element cimport Element |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
2 from pytouhou.utils.interpolator cimport Interpolator |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
3 |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
4 cdef class Enemy(Element): |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
5 cdef public double z, angle, speed, rotation_speed, acceleration |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
6 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 |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
7 cdef public bint visible, was_visible, touchable, collidable, damageable, boss, automatic_orientation, delay_attack |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
8 cdef public tuple difficulty_coeffs, extended_bullet_attributes, bullet_attributes, bullet_launch_offset, movement_dependant_sprites, screen_box |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
9 cdef public dict laser_by_id |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
10 cdef public list aux_anm |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
11 cdef public Interpolator interpolator, speed_interpolator |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
12 cdef public object _game, _anms, process |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
13 |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
14 cdef double[2] hitbox_half_size |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
15 |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
16 cpdef play_sound(self, index) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
17 cpdef set_hitbox(self, double width, double height) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
18 cpdef set_bullet_attributes(self, type_, anim, sprite_idx_offset, |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
19 bullets_per_shot, number_of_shots, speed, speed2, |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
20 launch_angle, angle, flags) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
21 cpdef set_bullet_launch_interval(self, long value, unsigned long start=*) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
22 cpdef fire(self, offset=*, bullet_attributes=*, launch_pos=*) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
23 cpdef new_laser(self, variant, laser_type, sprite_idx_offset, angle, speed, |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
24 start_offset, end_offset, max_length, width, |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
25 start_duration, duration, end_duration, |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
26 grazing_delay, grazing_extra_duration, unknown, |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
27 offset=*) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
28 cpdef select_player(self, players=*) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
29 cpdef get_player_angle(self, player=*, pos=*) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
30 cpdef set_anim(self, index) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
31 cdef void die_anim(self) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
32 cdef void drop_particles(self, long number, long color) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
33 cpdef set_aux_anm(self, long number, long index) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
34 cpdef set_pos(self, x, y, z) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
35 cpdef move_to(self, duration, x, y, z, formula) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
36 cpdef stop_in(self, duration, formula) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
37 cpdef bint is_visible(self, long screen_width, long screen_height) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
38 cdef void check_collisions(self) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
39 cdef void handle_callbacks(self) |
e8dc95a2a287
Make pytouhou.game.enemy an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
40 cpdef update(self) |