Mercurial > touhou
annotate pytouhou/game/player.pxd @ 467:5bb7d2c0ff46
Fix lasers sprite handling
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Thu, 12 Sep 2013 14:43:38 +0200 |
parents | 5f5955635d2c |
children | feecdb4a8928 |
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 |
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 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
|
11 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
|
12 |
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 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
|
15 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
|
16 cdef public long death_time |
447
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
445
diff
changeset
|
17 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
|
18 |
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 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
|
20 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
|
21 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
|
22 |
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 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
|
24 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
|
25 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
|
26 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
|
27 cpdef update(self, long keystate) |