private int m_sAnimCount = 0; // animation count //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // CONSTRUTOR //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // @Brief : Constructor // @Param : vFrom => Value from of animation // vTo => Value to of animation // fTime => Animation end time // eEaseType => Ease type // fEase => Ease // cbEnd => Callback at the end of the animation public KrVectorValueAnimator(Vector3 vFrom, Vector3 vTo, float fTime, KrValueAnimator.eEASE eEaseType, float fEase, System.Action cbEnd = null) { m_pXValue = new KrValueAnimator(vFrom.x, vTo.x, fTime, eEaseType, fEase, cbCountDownEndAnim); m_pYValue = new KrValueAnimator(vFrom.y, vTo.y, fTime, eEaseType, fEase, cbCountDownEndAnim); m_pZValue = new KrValueAnimator(vFrom.z, vTo.z, fTime, eEaseType, fEase, cbCountDownEndAnim); m_cbEnd = cbEnd; m_sAnimCount = 3; }
private bool m_bIsFade = false; // is fade //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // CONSTRUCTOR //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // @Brief : Constructor // @Param : eEaseType => easing type // : fEase => ease // : fEaseTime => easing time // @Return : KrCharagekiUIFade instance public KrCharagekiUIFade() { m_EaseType = KrValueAnimator.eEASE.NONE; m_fEase = 1.0f; m_fTime = 1.0f; m_cbUpdateFade = null; m_pValueAnimator = null; m_bIsFade = false; }
// @Brief : Play // @Param : fFrom => Value from of animation // fTo => Value to of animation // cbEnd => Callback at the end of the animation public void Play(float fFrom, float fTo, System.Action cbEnd = null) { m_pValueAnimator = new KrValueAnimator(fFrom, fTo, m_fTime, m_EaseType, m_fEase, cbEnd); m_pValueAnimator.Play(); }