Ejemplo n.º 1
0
    public void MoveTrigger(AxisEventData data)
    {
        string result = mText.text;

        switch (data.moveDir)
        {
        case MoveDirection.Down:
        case MoveDirection.Up:
            result = result.Replace("< ", "");
            result = result.Replace(" >", "");
            option = NextOption();
            if (option == GameOverOption.Restart)
            {
                result = result.Replace("Restart", "< Restart >");
            }
            else if (option == GameOverOption.Quit)
            {
                result = result.Replace("Quit", "< Quit >");
            }
            mText.text = result;
            break;

        default:
            break;
        }
    }
Ejemplo n.º 2
0
        public void ToggleOption()
        {
            if (this.currentOption == GameOverOption.GoToTitle)
            {
                this.currentOption = GameOverOption.Restart;
                return;
            }

            this.currentOption++;
        }