static public UCL_Tweener Tweener(float duration) { var obj = UCL_Tweener.CreateTweener(); obj.SetDuration(duration); return(obj); }
static public UCL_Tweener TweenerMs(long durationMs) { var obj = UCL_Tweener.CreateTweener(); obj.DurationMs = durationMs; return(obj); }
virtual public void Kill() { if (m_Tweener != null) { m_Tweener.Kill(m_CompleteWhenKill); m_Tweener = null; } }
virtual protected UCL_Tweener CreateTweener() { Kill(); m_Tweener = LibTween.Tweener(m_Duration).SetEase(m_Ease); if (m_TweenerComponents == null) { m_TweenerComponents = new List <UCL_TC_Data>(); } for (int i = 0; i < m_TweenerComponents.Count; i++) { var comp = m_TweenerComponents[i].CreateTweenerComponent(); m_Tweener.AddComponent(comp); } m_Tweener.OnComplete(() => { EndTween(true); }); return(m_Tweener); }
static public UCL_Tweener Tweener() { return(UCL_Tweener.CreateTweener()); }