Exemple #1
0
    def setup(self):
        scr_size = self.app.screen.get_size()

        self.level = Level(scr_size)
        self.level.restart()

        self.cheat_idx = 0

        self.background = TiledImage(load_image("grass"))

        # makes things look a bit nicer for some reason
        w = self.background.rect.width
        self.background.rect.move_ip(-w / 2, -w / 2)

        self.l_shadow = ShadowLayer(scr_size)
        self.l_sprite = Layer(scr_size)

        self.sprites = Group()

        self.app.scores.reset()

        self.font = pygame.font.Font(None, 60)

        self.cheating = False

        play_song("maintheme", volume=0.7)
Exemple #2
0
    def setup(self):
        scr_size = self.app.screen.get_size()

        self.level = Level(scr_size)
        self.level.restart()

        self.cheat_idx = 0

        self.background = TiledImage(load_image("grass"))

        # makes things look a bit nicer for some reason
        w = self.background.rect.width
        self.background.rect.move_ip(-w/2, -w/2)

        self.l_shadow = ShadowLayer(scr_size)
        self.l_sprite = Layer(scr_size)

        self.sprites = Group()

        self.app.scores.reset()

        self.font = pygame.font.Font(None, 60) 

        self.cheating = False

        play_song("maintheme", volume=0.7)
Exemple #3
0
    def setup(self):
        if not hasattr(self.app, "scores"):
            self.app.scores = Score()

        self.title = load_image("logo")

        font = pygame.font.Font(None, 60)
        font.set_italic(True)
        self.inst = font.render("Press <SPACE> to Start", True, self.fg_color, self.bg_color)

        font.set_italic(False)
        self.score = font.render("Hiscore: %05d" % self.app.scores.hiscore, True, self.fg_color, self.bg_color)

        self.anim = CoinAnimation(duration=100000)
        self.background = MenuBackground()

        play_song("title")
Exemple #4
0
    def setup(self):
        if not hasattr(self.app, "scores"):
            self.app.scores = Score()

        self.title = load_image("logo")

        font = pygame.font.Font(None, 60)
        font.set_italic(True)
        self.inst = font.render("Press <SPACE> to Start", True, self.fg_color, self.bg_color)

        font.set_italic(False)
        self.score = font.render("Hiscore: %05d" % self.app.scores.hiscore, True, self.fg_color, self.bg_color)

        self.anim = CoinAnimation(duration=100000)
        self.background = MenuBackground()

        play_song("title")