private void StopSelection() { if (_selectionAnimation != null) { _selectionAnimation.Stop(); } }
public void Stop() { started = true; if (null != scenarioItem) { scenarioItem.Stop(); } }
public virtual void Stop() { if (syncScenarioItem != null && !syncScenarioItem.IsComplete()) { Pause(); syncScenarioItem.Stop(); } complete = true; }
public override void StartTurn(UnitController unit) { base.StartTurn(unit); _selectionAnimation?.Stop(); _selectionAnimation = GetSelectionAnimation().PlayAndReturnSelf(); UIDragController.Instance.Activate(unit.Position); UIDragController.Instance.Swipe += OnSwipe; }
public void OnHealthChanged(CharacterStat stat) { if (_prevHealthValue > stat.CurrentValue) { _damageTakenItem?.Stop(); _damageTakenItem = DamageEffect.GetExplosionItem(0.3f).PlayRegisterAndReturnSelf(); } _prevHealthValue = stat.CurrentValue; }
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(); } }
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()); }
public virtual ISyncScenarioItem Apply(CastContext castContext) { castScenario?.Stop(); castScenario = Config.Apply(castContext, Level); return(castScenario); }
public virtual ISyncScenarioItem Attach(CastContext castContext) { attachScenario?.Stop(); attachScenario = Config.Attach(castContext, Level); return(attachScenario); }
public override void Clear() { _turnScenarioItem?.Stop(); }