spaceblaster: Don't pass initial beam positions

The initial beam positions are set in the fire function based on beam
size and the ship position.  This currently isn't know when beams are
constructed.
This commit is contained in:
Bryan Schumaker 2011-01-01 15:04:06 -05:00
parent ed52d5b57f
commit 8396bc0fca
2 changed files with 7 additions and 7 deletions

View File

@ -15,5 +15,5 @@ class Beam(GO):
self.move_y(1)
class CSEBeam(Beam):
def __init__(self, GAME, pos):
Beam.__init__(self, GAME, "blue", pos, (0, -1.4))
def __init__(self, GAME):
Beam.__init__(self, GAME, "blue", (0,0), (0, -1.4))

View File

@ -22,25 +22,25 @@ class CSE1670(ArcadeShip):
def fire(self):
beams = []
if self.weapon_level % 2 == 0:
b = CSEBeam(self.game, (0, 0))
b = CSEBeam(self.game)
b.x = self.x + (0.5 * (self.w - b.w))
b.y = self.y - b.w
beams.append(b)
if self.weapon_level != 0:
b = CSEBeam(self.game, (0, 0))
b = CSEBeam(self.game)
b.x = self.x + (0.5 * (self.w - b.w)) + 15
b.y = self.y - b.w + 10
beams.append(b)
b = CSEBeam(self.game, (0, 0))
b = CSEBeam(self.game)
b.x = self.x + (0.5 * (self.w - b.w)) - 15
b.y = self.y - b.w + 10
beams.append(b)
if self.weapon_level >= 3:
b = CSEBeam(self.game, (0, 0))
b = CSEBeam(self.game)
b.x = self.x + (0.5 * (self.w - b.w)) + 30
b.y = self.y - b.w + 20
beams.append(b)
b = CSEBeam(self.game, (0, 0))
b = CSEBeam(self.game)
b.x = self.x + (0.5 * (self.w - b.w)) - 30
b.y = self.y - b.w + 20
beams.append(b)