Mercurial > touhou
changeset 200:300661f2ae8a
Fix orbs' original position
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Mon, 31 Oct 2011 17:54:06 +0100 (2011-10-31) |
parents | 8ec34c56fed0 |
children | 220c122f428c |
files | pytouhou/game/orb.py pytouhou/games/eosd.py |
diffstat | 2 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/pytouhou/game/orb.py +++ b/pytouhou/game/orb.py @@ -18,6 +18,9 @@ from pytouhou.vm.anmrunner import ANMRun class Orb(object): + __slots__ = ('_sprite', '_anmrunner', 'offset_x', 'offset_y', 'player_state', + 'fire') + def __init__(self, anm_wrapper, index, player_state, fire_func): self._sprite = Sprite() self._anmrunner = ANMRunner(anm_wrapper, index, self._sprite)
--- a/pytouhou/games/eosd.py +++ b/pytouhou/games/eosd.py @@ -121,8 +121,8 @@ class ReimuB(Reimu): self.orbs = [Orb(self.anm_wrapper, 128, self.state, self.orb_fire), Orb(self.anm_wrapper, 129, self.state, self.orb_fire)] - self.orbs[0].dx = -24 - self.orbs[1].dx = 24 + self.orbs[0].offset_x = -24 + self.orbs[1].offset_x = 24 def fire_spine(self, orb, offset_x): @@ -175,9 +175,6 @@ class ReimuB(Reimu): self.fire_spine(orb, 0) - def update(self, keystate): - Player.update(self, keystate) - class Marisa(Player): def __init__(self, state, game, resource_loader): @@ -213,6 +210,7 @@ class Marisa(Player): bullet_angle += self.bullet_angle + class MarisaA(Marisa): def __init__(self, state, game, resource_loader): Marisa.__init__(self, state, game, resource_loader) @@ -235,6 +233,7 @@ class MarisaA(Marisa): pass #TODO + class MarisaB(Marisa): def __init__(self, state, game, resource_loader): Marisa.__init__(self, state, game, resource_loader) @@ -260,3 +259,4 @@ class MarisaB(Marisa): else: pass #TODO +