Mercurial > touhou
comparison pytouhou/game/effect.pyx @ 447:78e1c3864e73
Make pytouhou.game.game an extension type.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 17 Aug 2013 06:29:53 +0200 |
parents | cae83b963695 |
children | 292fea5c584e |
comparison
equal
deleted
inserted
replaced
446:3a33ed7f3b85 | 447:78e1c3864e73 |
---|---|
12 ## GNU General Public License for more details. | 12 ## GNU General Public License for more details. |
13 ## | 13 ## |
14 | 14 |
15 from pytouhou.game.sprite cimport Sprite | 15 from pytouhou.game.sprite cimport Sprite |
16 from pytouhou.vm.anmrunner import ANMRunner | 16 from pytouhou.vm.anmrunner import ANMRunner |
17 | |
18 from pytouhou.game.game cimport Game | |
17 | 19 |
18 | 20 |
19 cdef class Effect(Element): | 21 cdef class Effect(Element): |
20 def __init__(self, pos, index, anm): | 22 def __init__(self, pos, index, anm): |
21 Element.__init__(self, pos) | 23 Element.__init__(self, pos) |
33 self.removed = True | 35 self.removed = True |
34 | 36 |
35 | 37 |
36 | 38 |
37 cdef class Particle(Effect): | 39 cdef class Particle(Effect): |
38 def __init__(self, pos, index, anm, long amp, game, bint reverse=False, long duration=24): | 40 def __init__(self, pos, index, anm, long amp, Game game, bint reverse=False, long duration=24): |
39 Effect.__init__(self, pos, index, anm) | 41 Effect.__init__(self, pos, index, anm) |
40 | 42 |
41 self.frame = 0 | 43 self.frame = 0 |
42 self.duration = duration | 44 self.duration = duration |
43 | 45 |