annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
445
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
1 from pytouhou.game.element cimport Element
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
2
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
3 cdef class PlayerState:
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
4 cdef public double x, y
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
5 cdef public bint touchable, focused
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
6 cdef public long character, score, effective_score, lives, bombs, power, graze, points, invulnerable_time, power_bonus
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
7
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
8
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
9 cdef class Player(Element):
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
10 cdef public PlayerState state
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
11 cdef public object _game
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
12 cdef public long death_time
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
13
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
14 cdef object anm
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
15 cdef tuple speeds
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
16 cdef long fire_time, direction
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
17
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
18 cdef void set_anim(self, index)
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
19 cpdef play_sound(self, str name)
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
20 cpdef collide(self)
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
21 cdef void fire(self)
b0abb05811f7 Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
22 cpdef update(self, long keystate)