Exemplo n.º 1
0
    public void completeStage(Astronaut.Element stageelement)
    {
        bool completinggame = false;

        switch (stageelement)
        {
        case Astronaut.Element.Fire:
        {
            FireVitaLevelAchieved = Mathf.Max(1 + Astronaut.TheAstronaut.VitaLevel, FireVitaLevelAchieved);
            FireWorldCompleted    = true;
            break;
        }

        case Astronaut.Element.Ice:
        {
            IceVitaLevelAchieved = Mathf.Max(1 + Astronaut.TheAstronaut.VitaLevel, IceVitaLevelAchieved);
            IceWorldCompleted    = true;

            break;
        }

        case Astronaut.Element.Grass:
        {
            JungleVitaLevelAchieved = Mathf.Max(1 + Astronaut.TheAstronaut.VitaLevel, JungleVitaLevelAchieved);
            JungleWorldCompleted    = true;
            break;
        }

        case Astronaut.Element.Void:
        {
            //If you complete this stage, you've beaten the game
            VoidVitaLevelAchieved = Mathf.Max(1 + Astronaut.TheAstronaut.VitaLevel, VoidVitaLevelAchieved);
            VoidWorldCompleted    = true;
            completinggame        = true;

            break;
        }
        }

        /*
         * //FOR TESTING PURPOSES
         * if ((JungleWorldCompleted) && (FireWorldCompleted) && (IceWorldCompleted) && (VoidWorldCompleted))
         * {
         *  completinggame = true;
         * }
         */

        if (completinggame)
        {
            PlanetSelectorEntrance = PlanetSelector.EntranceType.BeatVoidPlanet;
            FinishedGame           = true;
            SceneManager.LoadScene("StartScene");
        }
        else
        {
            SceneManager.LoadScene("PlanetSelectScene");
        }
        ShotgunInventory         = Astronaut.TheAstronaut.ShotgunAmmo;
        MachineGunInventory      = Astronaut.TheAstronaut.GatlingAmmo;
        LaserRifleInventory      = Astronaut.TheAstronaut.LaserAmmo;
        GrenadeLauncherInventory = Astronaut.TheAstronaut.GrenadeLauncherAmmo;
        TeslaInventory           = Astronaut.TheAstronaut.TeslaAmmo;
        StimPackInventory        = Astronaut.TheAstronaut.StimPacks;
    }
Exemplo n.º 2
0
 public void leaveEndingScene()
 {
     PlanetSelectorEntrance = PlanetSelector.EntranceType.FinishingGame;
     FinishedGame           = true;
     SceneManager.LoadScene("StartScene");
 }