def main(): scene = Scene("scene0",) scene.pre_cut = Cut("Cuidado,Zumbis!") scene.margin = 0 scene.window_height = 9 # scene.window_width = 9 simpleloop(scene, (800, 400),)
def passar_fase(self): mensagens = [ u"Proxima fase!", u"Ainda tem mais", u"Mais dificil", u"E a fase Bônus!" ] scene_name = self.controller.scene.scene_name scene_number = int(scene_name.split("_")[-1]) next_scene = "fase_%d" % (scene_number + 1) cena = Scene(next_scene) cena.pre_cut = Cut(mensagens[scene_number - 1]) self.controller.load_scene(cena) self.controller.soft_reset() self.controller.force_redraw = True
def on_over(self, other): if not isinstance(other, Heroi): return if not self.controller.diary.get("falou com o velho"): return proximas = {"quadra": ("mapa01", u"Cuidado, zumbis!"), "mapa01": ("mapa02", u"Seja rápido!")} atual = self.controller.scene.scene_name if atual != "mapa02": cena = Scene(proximas[atual][0], display_type="overlay", margin=0) cena.pre_cut = Cut(proximas[atual][1]) else: fundo = pygame.image.load("scenes/tela_final.png") post_cut = Cut( u"Parabens, voce ganhou!", background=fundo, options=[("Jogar de novo", Scene.default_game_over_continue), ("Sair", Scene.default_game_over_exit)], ) self.controller.enter_cut(post_cut) self.controller.load_scene(cena) self.controller.force_redraw = True
def main(): scene = Scene("fase_1") scene.pre_cut = Cut("Bem-vindo ao labirinto") simpleloop(scene, (800,600),)
def principal(): cena = Scene("quadra", display_type="overlay", margin=0) cena.width = 8 cena.height = 6 simpleloop(cena, (800, 600))