def __init__(self): GameState.__init__(self) self.time = 0.0 self.playerSprites = pygame.sprite.Group() self.playerSprites.add(BorderPlayer( Globals.WIDTH, Globals.HEIGHT, 0, 0, Player.INDEX_DOWN)) self.playerSprites.add(BorderPlayer( Globals.WIDTH, Globals.HEIGHT, Globals.WIDTH, 0, Player.INDEX_LEFT)) self.playerSprites.add( BorderPlayer(Globals.WIDTH, Globals.HEIGHT, 0, Globals.HEIGHT, Player.INDEX_RIGHT)) self.playerSprites.add( BorderPlayer(Globals.WIDTH, Globals.HEIGHT, Globals.WIDTH, Globals.HEIGHT, Player.INDEX_UP))
def __init__(self): GameState.__init__(self) self.size = Title.INIT_SIZE self.delta = 1 self.time_delta = 0 self.font = pygame.font.Font(None, self.size) self.title_surf = self.font.render(GAME_TITLE, True, TITLE_COLOR) self.title_rect = self.title_surf.get_rect() self.title_rect.centerx = Globals.SCREEN.get_rect().centerx self.title_rect.centery = Globals.SCREEN.get_rect().centery self.alt_surf = Title.ALT_FONT.render(Title.ALT_TITLE, True, Title.ALT_COLOR) self.alt_rect = self.alt_surf.get_rect() self.alt_rect.centerx = Globals.SCREEN.get_rect().centerx self.alt_rect.centery = self.title_rect.bottom + Title.MAX_DELTA + Title.ALT_PADDING
def __init__(self): GameState.__init__(self) self.size = HowToPlay.INIT_SIZE self.delta = 1 self.time_delta = 0 self.font = pygame.font.Font(None, self.size) self.title_surf = self.font.render(TITLE, True, TITLE_COLOR) self.title_rect = self.title_surf.get_rect() self.title_rect.centerx = Globals.SCREEN.get_rect().centerx self.title_rect.top = Globals.SCREEN.get_rect().top + TITLE_PADDING self.alt_surf = HowToPlay.ALT_FONT.render(HowToPlay.ALT_TITLE, True, HowToPlay.ALT_COLOR) self.alt_rect = self.alt_surf.get_rect() self.alt_rect.centerx = Globals.SCREEN.get_rect().centerx self.alt_rect.centery = self.title_rect.bottom + HowToPlay.MAX_DELTA + \ HowToPlay.ALT_PADDING
def __init__(self): GameState.__init__(self) self.size = HowToPlay.INIT_SIZE self.delta = 1 self.time_delta = 0 self.font = pygame.font.Font(None, self.size) self.alpha_factor = 300 # self.title_surf = self.font.render(TITLE, True, TITLE_COLOR) # self.title_rect = self.title_surf.get_rect() # self.title_rect.centerx = Globals.SCREEN.get_rect().centerx # self.title_rect.top = Globals.SCREEN.get_rect().top + TITLE_PADDING self.alt_surf = HowToPlay.ALT_FONT.render(HowToPlay.ALT_TITLE, True, HowToPlay.ALT_COLOR) self.alt_rect = self.alt_surf.get_rect() self.alt_rect.centerx = Globals.SCREEN.get_rect().centerx self.alt_rect.centery = HowToPlay.MAX_DELTA + \ HowToPlay.ALT_PADDING self.init_subtitle() Globals.play_menu_sound()
def __init__(self): GameState.__init__(self) # self.size = Title.INIT_SIZE self.diff = 0 self.delta = 1 self.time_delta = 0 # self.font = pygame.font.Font(None, self.size) # self.base_surf = self.font.render(GAME_TITLE, True, TITLE_COLOR) self.base_surf = TITLE_IMG self.base_size = self.base_surf.get_rect().size # Title.INIT_SIZE = self.base_size[1] self.widthrat = self.base_size[0] / self.base_size[1] self.title_surf = self.base_surf self.title_rect = self.title_surf.get_rect() self.title_rect.centerx = Globals.SCREEN.get_rect().centerx self.title_rect.centery = Globals.SCREEN.get_rect().centery self.alt_surf = Title.ALT_FONT.render(Title.ALT_TITLE, True, Title.ALT_COLOR) self.alt_rect = self.alt_surf.get_rect() self.alt_rect.centerx = Globals.SCREEN.get_rect().centerx self.alt_rect.centery = self.title_rect.bottom + Title.MAX_DELTA + \ Title.ALT_PADDING Globals.play_menu_sound()
def __init__(self): GameState.__init__(self) self.color = pygame.color.Color("black") self.time = 0.0 self.highscoreManager = HighscoreManager()
def __init__(self): GameState.__init__(self) self.color = pygame.color.Color("black")
def __init__(self, display): GameState.__init__(self, display) self.board = Board() self.shape = Shape(self.board, self.randomShape())
def __init__(self): GameState.__init__(self) self.color = pygame.color.Color("black") self.time = 0 self.selection = 0 Globals.play_menu_sound()
def __init__(self): GameState.__init__(self) self.color = pygame.color.Color("black") self.time = 0 self.selection = 0