annotate pytouhou/game/player.pxd @ 597:244c99c568c8

Don’t hardcode the available games and interfaces, and relocation them.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 25 Oct 2014 18:52:16 +0200
parents 6be9c99a3a24
children a6af3ff86612
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
447
78e1c3864e73 Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 445
diff changeset
2 from pytouhou.game.game cimport Game
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
3
494
6be9c99a3a24 Merge PlayerState into Player, fix player respawn position.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 492
diff changeset
4 cdef class Player(Element):
6be9c99a3a24 Merge PlayerState into Player, fix player respawn position.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 492
diff changeset
5 cdef public Game _game
6be9c99a3a24 Merge PlayerState into Player, fix player respawn position.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 492
diff changeset
6 cdef public long death_time
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
7 cdef public bint touchable, focused
465
5f5955635d2c Move continues to PlayerState, and make sure they aren’t reinitialized before each stage.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 457
diff changeset
8 cdef public long character, score, effective_score, lives, bombs, power
5f5955635d2c Move continues to PlayerState, and make sure they aren’t reinitialized before each stage.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 457
diff changeset
9 cdef public long graze, points
5f5955635d2c Move continues to PlayerState, and make sure they aren’t reinitialized before each stage.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 457
diff changeset
10
492
887de1309491 Add friendly fire in netplay.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 468
diff changeset
11 cdef long number
465
5f5955635d2c Move continues to PlayerState, and make sure they aren’t reinitialized before each stage.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 457
diff changeset
12 cdef long invulnerable_time, power_bonus, continues, continues_used, miss,
5f5955635d2c Move continues to PlayerState, and make sure they aren’t reinitialized before each stage.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 457
diff changeset
13 cdef long bombs_used
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
14
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 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
16 cdef tuple speeds
457
4ccc47828002 Display the name of a spellcard and the face of its invoker.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 447
diff changeset
17 cdef long fire_time, bomb_time, direction
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
18
468
feecdb4a8928 Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 465
diff changeset
19 cdef void set_anim(self, index) except *
feecdb4a8928 Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 465
diff changeset
20 cdef void play_sound(self, str name) except *
feecdb4a8928 Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 465
diff changeset
21 cdef void collide(self) except *
feecdb4a8928 Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 465
diff changeset
22 cdef void fire(self) except *
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
23 cpdef update(self, long keystate)