Esempio n. 1
0
 def __init__(self, name, width, heigth,framerate):
     game.Game.__init__(self,config.TITLE, config.SCREEN_X, config.SCREEN_Y)
     # problems self.surfaceimg = surface.blit(image,(self.ship.position.pair()))
     self.space = []
     self.surfaceing = pygame.image.load("img/mFShip.png").convert_alpha()
     self.ship = ship.Ship(self.surfaceing)
     self.space.append(self.ship)
     for num in range(config.ROCK_COUNT):
         self.bRock = rock.bigRock()
         self.space.append(self.bRock)
Esempio n. 2
0
 def __init__(self, name, width, heigth, framerate):
     game.Game.__init__(self, config.TITLE, config.SCREEN_X,
                        config.SCREEN_Y)
     # problems self.surfaceimg = surface.blit(image,(self.ship.position.pair()))
     self.space = []
     self.surfaceing = pygame.image.load("img/mFShip.png").convert_alpha()
     self.ship = ship.Ship(self.surfaceing)
     self.space.append(self.ship)
     for num in range(config.ROCK_COUNT):
         self.bRock = rock.bigRock()
         self.space.append(self.bRock)
Esempio n. 3
0
 def __init__(self, name, width, heigth,framerate):
     game.Game.__init__(self,config.TITLE, config.SCREEN_X, config.SCREEN_Y)
     self.space = []
     self.ship = ship.Ship()
     self.bullets = []
     self.b = 0
     for bu in range(config.BULLET_COUNT):
     	self.bullets.append (bullet.Bullet(Point(self.ship.shipX, self.ship.shipY),self.ship.rotation))
     
     for numb in range(config.STAR_COUNT):
     	self.star = star.Star()
     	self.space.append(self.star)
     
     for num in range(config.ROCK_COUNT):
         self.bRock = rock.bigRock()
         self.space.append(self.bRock)
     self.space.append(self.ship)
Esempio n. 4
0
 def __init__(self, name, width, heigth,framerate):
     game.Game.__init__(self,config.TITLE, config.SCREEN_X, config.SCREEN_Y)
     self.space   = []
     self.ship    = ship.Ship()
     self.bullets = []
     self.rocks   = []
     self.bfighter= []
     self.b       = 0
     
     for bu in range(config.BULLET_COUNT):
     	self.bullets.append (bullet.Bullet(Point(self.ship.shipX, self.ship.shipY),self.ship.rotation))
     
     for numb in range(config.STAR_COUNT):
     	self.star = star.Star()
     	self.space.append(self.star)
     
     for num in range(config.ROCK_COUNT):
         self.bRock = rock.bigRock()
         self.rocks.append(self.bRock)
Esempio n. 5
0
 def __init__(self, name, width, heigth,framerate):
     game.Game.__init__(self,config.TITLE, config.SCREEN_X, config.SCREEN_Y)
     
     shipX = .5 * config.SCREEN_X
     shipY = .5 * config.SCREEN_Y
     ShipPos = Point(shipX,shipY)
     self.ship = ship.Ship(ShipPos,config.SHIP_INITIAL_DIRECTION, config.SHIP_COLOR)
     self.shipPos = ShipPos
     self.rocks = []
     totalRocks = config.ROCK_COUNT
     for r in range(totalRocks):
         bRockX = random.randrange(0,config.SCREEN_X)
         bRockY = random.randrange(0, config.SCREEN_Y)
         bRockPos = Point(bRockX,bRockY)
         oddOrEve = random.randrange(-1,2,2)
         rotation = random.uniform(config.ROCK_MIN_ROTATION_SPEED,config.ROCK_MAX_ROTATION_SPEED) * oddOrEve 
         self.bRock = rock.bigRock(bRockPos,random.uniform(0.0,359.99), config.ROCK_COLOR, rotation)
         self.rocks.append(self.bRock)
         self.bRockPos = bRockPos
Esempio n. 6
0
    def __init__(self, name, width, heigth, framerate):
        game.Game.__init__(self, config.TITLE, config.SCREEN_X,
                           config.SCREEN_Y)

        shipX = .5 * config.SCREEN_X
        shipY = .5 * config.SCREEN_Y
        ShipPos = Point(shipX, shipY)
        self.ship = ship.Ship(ShipPos, config.SHIP_INITIAL_DIRECTION,
                              config.SHIP_COLOR)
        self.shipPos = ShipPos
        self.rocks = []
        totalRocks = config.ROCK_COUNT
        for r in range(totalRocks):
            bRockX = random.randrange(0, config.SCREEN_X)
            bRockY = random.randrange(0, config.SCREEN_Y)
            bRockPos = Point(bRockX, bRockY)
            oddOrEve = random.randrange(-1, 2, 2)
            rotation = random.uniform(
                config.ROCK_MIN_ROTATION_SPEED,
                config.ROCK_MAX_ROTATION_SPEED) * oddOrEve
            self.bRock = rock.bigRock(bRockPos, random.uniform(0.0, 359.99),
                                      config.ROCK_COLOR, rotation)
            self.rocks.append(self.bRock)
            self.bRockPos = bRockPos