Beispiel #1
0
    def __init__(self, world, nivel=1):
        scene.Scene.__init__(self, world)
        common.play_music('menu.wav')

        self.items = [
                (u"Comenzar a jugar", game.Game),
                (u"Jugar mis niveles", game.GameCustom),
                (u"Editar niveles", editor.Editor),
                (u"Ver presentación",presents.Presents),
                (u"Salir", world.salir),
                ]
        if config.DISABLE_EDITOR:
            self.items.pop(1)

        self.sprites = group.Group()
        self.nubes = nubes.Nubes(self.sprites)
        self.font = pygame.font.Font(common.get_ruta('FreeSans.ttf'), int(config.HEIGHT * 0.08))
        self.font_small = pygame.font.Font(common.get_ruta('FreeSans.ttf'), int(config.HEIGHT * 0.04))
        self._draw_background()

        self.cursor = Cursor(world, self.items)
        self.cursor.definir_posicion(0)
        self.sprites.add(self.cursor)

        self.texto_menu = TextoMenu()
        self.sprites.add(self.texto_menu)

        self._crear_logotipo()
        self._crear_link()

        self.mouse = editor_mouse.EditorMouse()
        self.sprites.add(self.mouse)
Beispiel #2
0
 def __init__(self, world):
     pygame.mixer.init()
     common.play_music('intro.wav')
     scene.Scene.__init__(self, world)
     self.sprites = group.Group()
     self.background = common.load("presents/background.png", False, (config.WIDTH, config.HEIGHT))
     self.gcoop = GcoopLogo()
     self.presents = PresentsText()
     self.sprites.add(self.gcoop)
     self.draw_background()
     self.counter = 0
Beispiel #3
0
    def __init__(self, world, level=1, modo_editor=False):
        musicas = ['juego.wav', 'alternativa.wav']
        common.play_music(musicas[level%2])
        scene.Scene.__init__(self, world)
        self.sprites = group.Group()
        self.messages = messages.Messages(self.sprites)
        self.create_map(world, level)
        self._draw_background_and_map()
        self.change_state(PlayingGameState(self))
        self.level = level
        self.modo_editor = modo_editor

        if modo_editor:
            self.agregar_boton_para_regresar_al_editor()

        #self._create_a_pipe()
        self._create_mouse_pointer()
        self.sprites.sort_by_z()