# HG changeset patch # User Thibaut Girka # Date 1320080046 -3600 # Node ID 300661f2ae8a4177b9dc2fe53b90b5f34a18b69a # Parent 8ec34c56fed0896e8a4305850f2d3e8f99254e2e Fix orbs' original position diff --git a/pytouhou/game/orb.py b/pytouhou/game/orb.py --- 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) diff --git a/pytouhou/games/eosd.py b/pytouhou/games/eosd.py --- 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 +