def __init__(self): State.__init__(self, "Game") self.characterPosition = Vector(5, 7) self.character_colors = [RED, BLUE, WHITE, ORANGE, PURPLE] self.background_color = BLACK self.wall_color = Color.multiply(GREEN, 0.5) self.map = [] self.offset = 0.0 self.initial_scroll_speed = self.scroll_speed = 0.5 self.scroll_speed_increment = 0.1 self.sharpness = 1.1 self.ship_steer_speed = 0.1 self.ship = Ship(Vector(6, 1), self.character_colors[0], Color.multiply(self.character_colors[0], 0.8)) self.simulationPause = False self.sprites = [] for y in range(PIXEL_DIM_Y * 2 + 1): self.map.append(self.generate_map_slice())
def __init__(self): State.__init__(self, "Game") self.characterPosition = Vector(5, 7) self.character_colors = [RED, BLUE, WHITE, ORANGE, PURPLE] self.background_color = BLACK self.wall_color = Color.multiply(GREEN, 0.5) self.map = [] self.offset = 0.0 self.initial_scroll_speed = self.scroll_speed = 0.5 self.scroll_speed_increment = 0.1 self.sharpness = 1.1 self.ship_steer_speed = 0.1 self.ship = Ship(Vector(6, 1), self.character_colors[0], Color.multiply(self.character_colors[0], 0.8)) self.simulationPause = False self.sprites = [] for y in range(PIXEL_DIM_Y*2 + 1): self.map.append(self.generate_map_slice())
def __init__(self): State.__init__(self, "Main") w = PIXEL_DIM_X - 1 h = PIXEL_DIM_Y - 1 self.characters = [ AnimatedGameObject(Vector(0, 0), RED), AnimatedGameObject(Vector(w, 0), BLUE), AnimatedGameObject(Vector(0, h), GREEN), AnimatedGameObject(Vector(w, h), YELLOW) ]
def __init__(self): State.__init__(self, "Main") w = PIXEL_DIM_X - 1 h = PIXEL_DIM_Y - 1 self.point = Vector(6, 4) self.characters = [ AnimatedGameObject(Vector(0, 0), RED, BLUE), AnimatedGameObject(Vector(w, 0), BLUE, RED), AnimatedGameObject(Vector(0, h), GREEN, BLUE), AnimatedGameObject(Vector(w, h), YELLOW, BLUE) ] self.explosion = None for character in self.characters: character.score = 0 self.lastJump = 0
def __init__(self): State.__init__(self, "GameOver") self.started = time.time() self.sprite = FullscreenSprite(RED)