public override TweenBase CreateTween(ITweenAssetInjector injector) { var rect = (RectTransform)injector.GetInjection <RectTransform>(m_RectTransform); var from = m_from; var to = m_to; if (m_mode == Mode.Relative) { from += rect.anchoredPosition; to += rect.anchoredPosition; } return(Tween.moveRectFromTo(rect, from, to, m_duration, m_easing.GetEase())); }
public override TweenBase CreateTween(ITweenAssetInjector injector) { #if TMP_PRESENT var text = (TMP_Text)injector.GetInjection <TMP_Text>(m_text); var rect = (RectTransform)text.transform; var initScale = rect.localScale; var initPos = rect.anchoredPosition; var startPos = initPos + m_startPosition; var midPos = initPos + m_middlePosition; var endPos = initPos + m_endPosition; return(Tween.sequence( Tween.delay(m_preStartDelay), Tween.parallel( Tween.fromTo(0, 1, m_showDuration, m_showEasing.GetEase(), v => text.alpha = v), Tween.moveRectFromTo(rect, startPos, midPos, m_showDuration, m_showEasing.GetEase()), Tween.scaleFromTo(rect, m_startScale, m_middleScale, m_showDuration, m_showEasing.GetEase()) ), Tween.delay(m_middleDelay), Tween.parallel( Tween.fromTo(1, 0, m_hideDuration, m_hideEasing.GetEase(), v => text.alpha = v), Tween.moveRectFromTo(rect, midPos, endPos, m_hideDuration, m_hideEasing.GetEase()), Tween.scaleFromTo(rect, m_middleScale, m_endScale, m_hideDuration, m_hideEasing.GetEase()) ), Tween.invoke(() => { rect.anchoredPosition = initPos; rect.localScale = initScale; }) )); #else return(Tween.idle()); #endif }
public override TweenBase CreateTween(ITweenAssetInjector injector) { var animator = (Animator)injector.GetInjection <Animator>(m_Animator); return(Tween.invoke(() => animator.SetTrigger(m_triggerName))); }
public override TweenBase CreateTween(ITweenAssetInjector injector) { var rect = (RectTransform)injector.GetInjection <RectTransform>(m_RectTransform); return(Tween.scaleFromTo(rect, m_from, m_to, m_duration, m_easing.GetEase())); }
public override TweenBase CreateTween(ITweenAssetInjector injector) { var group = (CanvasGroup)injector.GetInjection <CanvasGroup>(m_CanvasGroup); return(Tween.invoke(() => group.blocksRaycasts = m_blockRaycasts)); }
public override TweenBase CreateTween(ITweenAssetInjector injector) { var group = (CanvasGroup)injector.GetInjection <CanvasGroup>(m_CanvasGroup); return(Tween.fromTo(m_from, m_to, m_duration, m_easing.GetEase(), onUpdate: v => group.alpha = v)); }