Example #1
0
        public override void KeyPressHandle(Key k)
        {
            switch (_state)
            {
            case State.BeforeGainExp:

                GiveExp();
                _state = State.AfterGainExp;
                break;

            case State.AfterGainExp:

                lock (_sync)
                {
                    _stopGivingExp = true;
                }

                GiveExpAnimation.Join();
                GiveExpAnimation = null;

                for (int i = 0; i < LevelUp.Length; i++)
                {
                    LevelUp[i].Visible = false;
                }

                Mastered.Visible = false;

                _screen = HoardScreen;
                _screen.ChangeControl(HoardItemLeft);
                _state = State.HoardScreen;

                break;

            case State.HoardScreen:

                _screen.Control.ControlHandle(k);

                break;
            }
        }
Example #2
0
        public override void KeyPressHandle(Key k)
        {
            switch (_state)
            {
                case State.BeforeGainExp:

                    GiveExp();
                    _state = State.AfterGainExp;
                    break;

                case State.AfterGainExp:

                    lock (_sync)
                    {
                        _stopGivingExp = true;
                    }

                    GiveExpAnimation.Join();
                    GiveExpAnimation = null;

                    for (int i = 0; i < LevelUp.Length; i++)
                    {
                        LevelUp[i].Visible = false;
                    }

                    Mastered.Visible = false;

                    _screen = HoardScreen;
                    _screen.ChangeControl(HoardItemLeft);
                    _state = State.HoardScreen;

                    break;

                case State.HoardScreen:

                    _screen.Control.ControlHandle(k);

                    break;
            }
        }