spaceblaster: created class CSE1670()

The CSE1670() is the players ship.  This class will be used to represent
the ship.
This commit is contained in:
Bryan Schumaker 2010-12-31 11:06:06 -05:00
parent eb44dc7f81
commit c5fb07a735
2 changed files with 7 additions and 2 deletions

View File

@ -12,7 +12,7 @@ DOWN = pygame.K_DOWN
class ArcadeState(games.GameState):
def __init__(self, GAME):
self.ship = ship.ArcadeShip(GAME, (10, 10), (1, 1))
self.ship = ship.CSE1670(GAME, (10, 10), (1, 1))
self.k_left = False
self.k_right = False
self.k_up = False

View File

@ -8,5 +8,10 @@ load = image.load
GO = object.GameObject
class ArcadeShip(GO):
def __init__(self, GAME, image, pos, speed):
GO.__init__(self, load(GAME, image), pos, speed)
class CSE1670(ArcadeShip):
def __init__(self, GAME, pos, speed):
GO.__init__(self, load(GAME, "cse_1670.png"), pos, speed)
ArcadeShip.__init__(self, GAME, "cse_1670.png", pos, speed)