Beispiel #1
0
    void SetupLevel()
    {
        Background background = new Background(0, 0);

        game.AddChild(background);

        Tyler                = new Sound("Sounds/Frank/boogaloo.mp3", false, false);
        _musicChannel        = Tyler.Play();
        _musicChannel.Volume = 0.10f;

        if (Input.GetKeyDown(Key.M))
        {
            _musicChannel.Volume = 0f;
        }

        boss1 = new Boss1(1700, 700, player);
        game.AddChild(boss1);

        boss1.HP     = 300;
        player.Lifes = 5;

        HUD_Boss hud = new HUD_Boss(boss1);

        game.AddChild(hud);


        Platform platform1 = new Platform(450, game.height / 2 + 300);

        game.AddChild(platform1);

        Platform platform2 = new Platform(850, game.height / 2);

        game.AddChild(platform2);

        Platform platform3 = new Platform(1250, game.height / 2 + 300);

        game.AddChild(platform3);

        game.AddChild(player);

        HUD_Player hud_player = new HUD_Player(player);

        game.AddChild(hud_player);

        HUD_Score hud_score = new HUD_Score(mygame);

        game.AddChild(hud_score);
    }
Beispiel #2
0
    void SetupLevel()
    {
        Kanye                = new Sound("Sounds/Kanye/Vintage.mp3", false, false);
        _musicChannel        = Kanye.Play();
        _musicChannel.Volume = 0.10f;

        Background1 background1 = new Background1(0, 0);

        game.AddChild(background1);


        boss2 = new Boss2(1700, 700, player);
        game.AddChild(boss2);

        boss2.HP     = 300;
        player.Lifes = 5;

        HUD_Boss hud = new HUD_Boss(boss2);

        game.AddChild(hud);


        Platform platform1 = new Platform(450, game.height / 2 + 400);

        game.AddChild(platform1);

        Platform platform2 = new Platform(850, game.height / 2 + 100);

        game.AddChild(platform2);

        Platform platform3 = new Platform(1250, game.height / 2 + 400);

        game.AddChild(platform3);


        game.AddChild(player);

        HUD_Player hud_player = new HUD_Player(player);

        game.AddChild(hud_player);

        HUD_Score hud_score = new HUD_Score(mygame);

        game.AddChild(hud_score);
    }