// Update is called once per frame
 public void goToAffinitySelection(Astronaut.Element planetelement)
 {
     //
 }
Ejemplo n.º 2
0
    public void setElement(Astronaut.Element e)
    {
        Element = e;
        switch (e)
        {
        case Astronaut.Element.Fire: {
            ElementSprite               = FireIcon;
            ElementColor                = new Color(1f, .6f, .1f);
            HeadlineText.text           = "FIRE ELEMENT OBTAINED";
            ElementDescriptionText.text = "Create a Bar of Fire that burns enemies and Melts Ice by pressing the Right Mouse Button";


            break;
        }

        case Astronaut.Element.Ice: {
            ElementSprite               = IceIcon;
            ElementColor                = new Color(.3f, .3f, 1f);
            HeadlineText.text           = "ICE ELEMENT OBTAINED";
            ElementDescriptionText.text = "Charge and Throw an Ice Projectile that freezes enemies by holding and releasing the Right Mouse Button";
            break;
        }

        case Astronaut.Element.Grass: {
            ElementSprite               = GrassIcon;
            ElementColor                = new Color(.2f, 1f, .1f);
            HeadlineText.text           = "GRASS ELEMENT OBTAINED";
            ElementDescriptionText.text = "Release a Vine that you can use to Grapple to high places and Grab Enemies by pressing the Right Mouse Button";
            break;
        }

        case Astronaut.Element.Void: {
            ElementSprite               = VoidIcon;
            ElementColor                = new Color(.8f, 0f, .8f);
            HeadlineText.text           = "VOID FORCE DEFEATED";
            ElementDescriptionText.text = "";
            break;
        }

        default: {
            ElementSprite = null;
            ElementColor  = Color.white;
            break;
        }
        }

        HeadlineGlow.color = ElementColor;
        HeadlineText.GetComponent <Outline>().effectColor = Color.Lerp(ElementColor, Color.black, .5f);
        ElementDescriptionText.color = Color.Lerp(ElementColor, Color.white, .5f);
        ElementDescriptionText.GetComponent <Outline>().effectColor = Color.Lerp(ElementColor, Color.black, .5f);
        CommendationGlow.color = ElementColor;
        Color midcol = Color.Lerp(ElementColor, Color.black, .5f);

        CommendationText.GetComponent <Outline>().effectColor = midcol;
        skill1 = Astronaut.getElementPowerLevelName(e, 0);
        skill2 = Astronaut.getElementPowerLevelName(e, 1);
        skill3 = Astronaut.getElementPowerLevelName(e, 2);
        skill4 = Astronaut.getElementPowerLevelName(e, 3);
        EndLevelNotchBase.color = new Color(ElementColor.r, ElementColor.g, ElementColor.b, .5f);
        EndLevelNotch1.color    = new Color(ElementColor.r, ElementColor.g, ElementColor.b, .5f);
        EndLevelNotch2.color    = new Color(ElementColor.r, ElementColor.g, ElementColor.b, .5f);
        FillBar.color           = new Color(ElementColor.r, ElementColor.g, ElementColor.b, FillBar.color.a);

        EndLevelNotch3.color       = new Color(ElementColor.r, ElementColor.g, ElementColor.b, .5f);
        EndLevelPowerBaseText.text = skill1;
        //EndLevelPowerBaseText.color = new Color(ElementColor.r, ElementColor.g, ElementColor.b, .5f);
        EndLevelPower1Text.text   = skill2;
        EndLevelPower2Text.text   = skill3;
        EndLevelPower3Text.text   = skill4;
        EndLevelSymbolBase.sprite = ElementSprite;
        EndLevelSymbol1.sprite    = ElementSprite;
        EndLevelSymbol2.sprite    = ElementSprite;
        EndLevelSymbol3.sprite    = ElementSprite;
    }
Ejemplo n.º 3
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;
    }