Mercurial > touhou
comparison pytouhou/game/player.pxd @ 445:b0abb05811f7
Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 17 Aug 2013 04:44:28 +0200 |
parents | |
children | 78e1c3864e73 |
comparison
equal
deleted
inserted
replaced
444:f26c8ab57257 | 445:b0abb05811f7 |
---|---|
1 from pytouhou.game.element cimport Element | |
2 | |
3 cdef class PlayerState: | |
4 cdef public double x, y | |
5 cdef public bint touchable, focused | |
6 cdef public long character, score, effective_score, lives, bombs, power, graze, points, invulnerable_time, power_bonus | |
7 | |
8 | |
9 cdef class Player(Element): | |
10 cdef public PlayerState state | |
11 cdef public object _game | |
12 cdef public long death_time | |
13 | |
14 cdef object anm | |
15 cdef tuple speeds | |
16 cdef long fire_time, direction | |
17 | |
18 cdef void set_anim(self, index) | |
19 cpdef play_sound(self, str name) | |
20 cpdef collide(self) | |
21 cdef void fire(self) | |
22 cpdef update(self, long keystate) |