示例#1
0
 public void ContinueSpin(ref GameStates gameState)
 {
     if (_fullScreenSpin)
     {
         if (_resourceManager.Loading._doneLoading && _spinCounter >= SPIN_MIN_LENGTH)
         {
             gameState = _queuedUpState;
             //_fader.FadeIn();
             _spinning = false;
         }
         else
         {
             _spinCounter++;
             _animator.AdvanceAnimationReplay();
         }
     }
     else
     {
         if (_resourceManager.Loading._doneLoading)
         {
             gameState = _queuedUpState;
             //_fader.FadeIn();
             _spinning = false;
         }
         else
         {
             _spinCounter++;
             _animator.AdvanceAnimationReplay();
         }
     }
 }
示例#2
0
        public void UpdateOwnLogic()
        {
            if (_animator.AnimationFinished)
            {
                if (_state == ButtonStates.Disabled || _state == ButtonStates.Enabled || _state == ButtonStates.Selected ||
                    _state == ButtonStates.HighlightDisabled || _state == ButtonStates.HighlightEnabled || _state == ButtonStates.HighlightSelected)
                {
                    _animator.AdvanceAnimationReplay();
                    return;
                }

                if (_state == ButtonStates.Select)
                {
                    if (_type == ButtonType.Standard)
                    {
                        _state = ButtonStates.Enabled;
                        _animator.SetNewAnimation((int)ButtonStates.Enabled);
                    }
                    else
                    {
                        _state = ButtonStates.Selected;
                        _animator.SetNewAnimation((int)ButtonStates.Selected);
                    }
                }

                if (_state == ButtonStates.Deselect || _state == ButtonStates.FadeIn)
                {
                    _state = ButtonStates.Enabled;
                    _animator.SetNewAnimation((int)ButtonStates.Enabled);
                }

                if (_state == ButtonStates.FadeOut)
                {
                    _state = ButtonStates.Hidden;
                }
            }
            else
            {
                _animator.AdvanceAnimation();
            }
        }