annotate pytouhou/game/player.pxd @ 492:887de1309491

Add friendly fire in netplay.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 21 Sep 2013 20:26:39 +0200
parents feecdb4a8928
children 6be9c99a3a24
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
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 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
5 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
6 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
7 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
8 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
9
492
887de1309491 Add friendly fire in netplay.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 468
diff changeset
10 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
11 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
12 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
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
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 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
16 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
17 cdef public long death_time
447
78e1c3864e73 Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 445
diff changeset
18 cdef public Game _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
19
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 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
21 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
22 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
23
468
feecdb4a8928 Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 465
diff changeset
24 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
25 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
26 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
27 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
28 cpdef update(self, long keystate)