Mercurial > touhou
annotate pytouhou/game/bullet.pxd @ 447:78e1c3864e73
Make pytouhou.game.game an extension type.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 17 Aug 2013 06:29:53 +0200 |
parents | 6b4c3e250bd6 |
children | 3bc37791f0a2 |
rev | line source |
---|---|
442
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
1 from pytouhou.game.element cimport Element |
447
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
442
diff
changeset
|
2 from pytouhou.game.game cimport Game |
442
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
3 from pytouhou.utils.interpolator cimport Interpolator |
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
4 |
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
5 cdef class Bullet(Element): |
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
6 cdef public unsigned long state, flags, frame, sprite_idx_offset, damage |
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
7 cdef public double dx, dy, angle, speed |
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
8 cdef public bint player_bullet, was_visible, grazed |
447
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
442
diff
changeset
|
9 cdef public object target, _bullet_type |
442
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
10 cdef public tuple hitbox |
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
11 cdef public list attributes |
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
12 |
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
13 cdef Interpolator speed_interpolator |
447
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
442
diff
changeset
|
14 cdef Game _game |
442
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
15 |
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
16 cdef bint is_visible(self, unsigned int screen_width, unsigned int screen_height) |
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
17 cpdef set_anim(self, sprite_idx_offset=*) |
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
18 cdef void launch(self) |
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
19 cpdef collide(self) |
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
20 cpdef cancel(self) |
6b4c3e250bd6
Type Bullet more, to improve performances.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
21 cpdef update(self) |