Exemplo n.º 1
0
        public override void ExitState()
        {
            if (!exit)
            {
                base.ExitState();
                DisableButtons();
            }
            else
            {
                if (goToState == StatesIdList.RUNNER)
                {
                    RunnerState rs = (RunnerState)parent.getState((int)goToState);
                    rs.CharName = selected.ToString().ToLower();
                    rs.Level    = chosenLevel;
                    rs.Subjects = chosenSubjects;
                    rs.GoBackTo = StatesIdList.EMPTY_STATE;
                }

                bgm.Stop(Microsoft.Xna.Framework.Audio.AudioStopOptions.AsAuthored);
                parent.ExitState(ID, (int)goToState);

                goToState = StatesIdList.EMPTY_STATE;

                ToggleButtonsOff();
            }
        }