Inheritance: CharAction
Exemplo n.º 1
0
        private void SorceressSkill_VisibleChanged(object sender, EventArgs e)
        {
            FireVolt.SetSkillPoints    = "0";
            Wram.SetSkillPoints        = "0";
            Inferno.SetSkillPoints     = "0";
            Blaze.SetSkillPoints       = "0";
            FireBall.SetSkillPoints    = "0";
            FireWall.SetSkillPoints    = "0";
            Inchent.SetSkillPoints     = "0";
            Meteo.SetSkillPoints       = "0";
            FireMastary.SetSkillPoints = "0";
            Hydra.SetSkillPoints       = "0";

            FireVolt.setTextBoxColor();
            Wram.setTextBoxColor();
            Inferno.setTextBoxColor();
            Blaze.setTextBoxColor();
            FireBall.setTextBoxColor();
            FireWall.setTextBoxColor();
            Inchent.setTextBoxColor();
            Meteo.setTextBoxColor();
            FireMastary.setTextBoxColor();
            Hydra.setTextBoxColor();
        }
Exemplo n.º 2
0
    public void Update()
    {
        if (selecting) {

            if ((Input.GetButtonDown("Up") || Input.GetButtonDown("Left")) && selIndex > 0) {
                selIndex--;
            }
            if ((Input.GetButtonDown("Down") || Input.GetButtonDown("Right")) && selIndex < options.Length - 1) {
                selIndex++;
            }
            if (Input.GetButtonDown("Select")) {
                string result = options[selIndex];

                if (result != "Skill") {

                    CharAction caction = null;

                    if (result == "Move") { caction = new Move(dchar) as CharAction; }
                    if (result == "Lift") { caction = new Lift(dchar) as CharAction; }
                    if (result == "Attack") { caction = new Attack(dchar) as CharAction; }
                    if (result == "Lob") { caction = new Lob(dchar) as CharAction; }
                    if (result == "Whirlwind") { caction = new Whirlwind(dchar) as CharAction; }
                    if (result == "Inferno") { caction = new Inferno(dchar) as CharAction; }
                    if (result == "Exit") { Application.Quit(); }
                    selecting = false;

                    Camera.mainCamera.audio.PlayOneShot(Resources.Load("audio/se/select") as AudioClip);
                    StartCoroutine(YieldReturn(caction));

                }

            }
            if (Input.GetButtonDown("Cancel")) {
                selecting = false;
                Camera.mainCamera.audio.PlayOneShot(Resources.Load("audio/se/cancel") as AudioClip);
                cfunc();
            }
        }
    }