Mercurial > touhou
annotate pytouhou/game/item.pxd @ 748:63f155923ea8
Cargo.toml: Remove useless panic=abort
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 25 Feb 2020 20:36:09 +0100 |
parents | a6af3ff86612 |
children |
rev | line source |
---|---|
446
3a33ed7f3b85
Make pytouhou.game.item an extension type.
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:
446
diff
changeset
|
2 from pytouhou.game.game cimport Game |
446
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
3 from pytouhou.game.player cimport Player |
472
8038f1957b71
Type bullettype, itemtype and lasertype a bit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
468
diff
changeset
|
4 from pytouhou.game.itemtype cimport ItemType |
446
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
5 from pytouhou.utils.interpolator cimport Interpolator |
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
6 |
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
7 |
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
8 cdef class Indicator(Element): |
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
9 cdef Item _item |
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
10 |
468
feecdb4a8928
Add “except *” to cdef void functions, and type some more.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
447
diff
changeset
|
11 cdef void update(self) nogil |
446
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
12 |
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
13 |
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
14 cdef class Item(Element): |
472
8038f1957b71
Type bullettype, itemtype and lasertype a bit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
468
diff
changeset
|
15 cdef public ItemType _item_type |
446
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
16 |
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
17 cdef unsigned long frame |
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
18 cdef long _type |
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
19 cdef double angle, speed |
447
78e1c3864e73
Make pytouhou.game.game an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
446
diff
changeset
|
20 cdef Game _game |
446
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
21 cdef Player player |
502
3d3285918ba1
Disallow collection of items dropped by the other player in netplay, also fixes a longstanding bug where autocollection worked with those items.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
472
diff
changeset
|
22 cdef Element target |
446
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
23 cdef Indicator indicator |
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
24 cdef Interpolator speed_interpolator, pos_interpolator |
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
25 |
617
a6af3ff86612
Change all “void except *” function into “bint except True”, to prevent PyErr_Occurred() from being called at each call.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
502
diff
changeset
|
26 cdef bint autocollect(self, Player player) except True |
a6af3ff86612
Change all “void except *” function into “bint except True”, to prevent PyErr_Occurred() from being called at each call.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
502
diff
changeset
|
27 cdef bint on_collect(self, Player player) except True |
446
3a33ed7f3b85
Make pytouhou.game.item an extension type.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
28 cpdef update(self) |