def __init__(self, driver, level):
     items = [
         MenuText(text="Game Over", size=100, color=(200, 10, 10)),
         MenuText(text="Press START to go back to Main Menu",
                  size=40,
                  color=SUBTITLE_COLOR),
     ]
     super().__init__(driver, Menu(driver, items))
     self.level = level
    def __init__(self, driver, level: Level):
        items = [
            MenuText(text="Congratules!", size=100, color=TITLE_COLOR),
            MenuText(text="Press START to go back to Main Menu",
                     size=40,
                     color=SUBTITLE_COLOR),
        ]
        super().__init__(driver, Menu(driver, items))

        self.level = level
        self.chars = CustomGroup()
        for player in self.driver.players:
            self.chars.add(player.char)

        jump_sound.set_volume(0)
        hit_sound.set_volume(0)
示例#3
0
 def __init__(self, driver):
     self.char_select = MultiCharSelect(driver.players)
     items = [
         MenuText(text="Choose your character", size=60, color=TITLE_COLOR),
         self.char_select,
     ]
     super().__init__(driver, items)
 def __init__(self, driver):
     items = [
         MenuText(text="FrenCoins", size=100, color=TITLE_COLOR),
         Button(handler=CharSelect(driver), text="Start Game"),
         Button(handler=MainMenuHandler(driver), text="Instructions"),
         Button(handler=QuitGame(driver),
                text="Exit",
                color=(170, 0, 0),
                hover_color=(220, 0, 0)),
     ]
     super().__init__(driver, Menu(driver, items))
    def __init__(self, driver, prev_state: InGame):
        items = [
            MenuText("Pause", size=100, color=SUBTITLE_COLOR),
            Button(handler=ContinueGame(driver), text="Continue"),
            Button(handler=StartGame(driver), text="Restart"),
            Button(handler=MainMenuHandler(driver), text="Main menu"),
            Button(handler=QuitGame(driver),
                   text="Exit",
                   color=(170, 0, 0),
                   hover_color=(220, 0, 0)),
        ]
        super().__init__(driver, Menu(driver, items))

        self.prev_state = prev_state

        # oscurecer juego
        self.background = self.driver.screen.copy()
        self.background.fill((0, 0, 0))
        self.background.set_alpha(150)
 def __init__(self, driver):
     items = [
         MenuText(text="FrenCoins", size=120, color=TITLE_COLOR),
         MenuText(text="Press START / ENTER", size=40),
     ]
     super().__init__(driver, Menu(driver, items))