/// <summary> /// Begins animating the toggle to the 'off' visual state. /// </summary> public override void AnimOff() { base.AnimOff(); switchImage.color = Tween.QuintOut(m_CurrentColor, m_OffColor, m_AnimDeltaTime, m_AnimationDuration); backImage.color = Tween.QuintOut(m_CurrentBackColor, backOffColor, m_AnimDeltaTime, m_AnimationDuration); switchRectTransform.anchoredPosition = Tween.SeptSoftOut(new Vector2(m_CurrentSwitchPosition, 0f), new Vector2(-8f, 0f), m_AnimDeltaTime, m_AnimationDuration); }
protected override void AnimOff() { base.AnimOff(); if (switchImage) { switchImage.color = Tween.QuintOut(m_CurrentColor, m_OffColor, m_AnimDeltaTime, m_AnimationDuration); } if (backImage) { backImage.color = Tween.QuintOut(m_CurrentBackColor, backOffColor, m_AnimDeltaTime, m_AnimationDuration); } if (slideSwitch) { switchRectTransform.anchoredPosition = Tween.SeptSoftOut(switchRectTransform.anchoredPosition, GetSlideAnchoredPosition(false), m_AnimDeltaTime, m_AnimationDuration); } }