Example #1
0
 private void StopSelection()
 {
     if (_selectionAnimation != null)
     {
         _selectionAnimation.Stop();
     }
 }
Example #2
0
        public void Stop()
        {
            started = true;

            if (null != scenarioItem)
            {
                scenarioItem.Stop();
            }
        }
Example #3
0
 public virtual void Stop()
 {
     if (syncScenarioItem != null && !syncScenarioItem.IsComplete())
     {
         Pause();
         syncScenarioItem.Stop();
     }
     complete = true;
 }
Example #4
0
        public override void StartTurn(UnitController unit)
        {
            base.StartTurn(unit);
            _selectionAnimation?.Stop();
            _selectionAnimation = GetSelectionAnimation().PlayAndReturnSelf();

            UIDragController.Instance.Activate(unit.Position);
            UIDragController.Instance.Swipe += OnSwipe;
        }
Example #5
0
        public void OnHealthChanged(CharacterStat stat)
        {
            if (_prevHealthValue > stat.CurrentValue)
            {
                _damageTakenItem?.Stop();
                _damageTakenItem = DamageEffect.GetExplosionItem(0.3f).PlayRegisterAndReturnSelf();
            }

            _prevHealthValue = stat.CurrentValue;
        }
Example #6
0
 public void SetValue(float value, bool instant = false)
 {
     _currentValue = Mathf.Clamp01(value);
     if (instant)
     {
         UpdateView();
     }
     else
     {
         _scenario?.Stop();
         _scenario = new SizeTween(_foreground.rectTransform, GetEndSize(), 0.3f, EaseType.Linear);
         _scenario.Play();
     }
 }
Example #7
0
        public ISyncScenarioItem OpenScreen(ScreenType screenTypeType, float duration = 0.3f)
        {
            if (TopScreen != null && TopScreen.ScreenType == screenTypeType || _currentTransition != null)
            {
                return(null);
            }

            var screenToOpen = _screensByType[screenTypeType];

            _currentTransition?.Stop();

            var transitions = new List <ISyncScenarioItem>();

            if (!screenToOpen.IsPopup && TopScreen != null)
            {
                transitions.Add(TopScreen.GetHideTransition(duration));
            }

            transitions.Add(screenToOpen.GetShowTransition(duration));

            _currentTransition = new SyncScenario(
                new List <ISyncScenarioItem>()
            {
                new CompositeItem(transitions)
            },
                (scenario, result) =>
            {
                TopScreen?.UnFocus();
                if (!screenToOpen.IsPopup && TopScreen != null)
                {
                    _openScreens.Remove(TopScreen);
                }
                _openScreens.Add(screenToOpen);
                screenToOpen.Focus();
                _currentTransition = null;
            });

            return(_currentTransition.PlayAndReturnSelf());
        }
Example #8
0
 public virtual ISyncScenarioItem Apply(CastContext castContext)
 {
     castScenario?.Stop();
     castScenario = Config.Apply(castContext, Level);
     return(castScenario);
 }
Example #9
0
 public virtual ISyncScenarioItem Attach(CastContext castContext)
 {
     attachScenario?.Stop();
     attachScenario = Config.Attach(castContext, Level);
     return(attachScenario);
 }
Example #10
0
 public override void Clear()
 {
     _turnScenarioItem?.Stop();
 }