Example #1
0
        protected override void InternalDispose()
        {
            lock (_sync)
            {
                _stopGivingExp = true;
            }

            if (GiveExpAnimation != null)
            {
                GiveExpAnimation.Join();
                GiveExpAnimation = null;
            }

            _screen.Dispose();
        }
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;
            }
        }