public static void Timer(float delay, OnAnimationCompleteCallback onDelayReachesCallback) { Tweener tweener = new Timer(); float deltaMove = 1 / delay; tweener.SetData(deltaMove, 0, 1, false, false, null, null, onDelayReachesCallback); TweenUpdater.pTweeners.Add(tweener); }
public TweenParam(float durationOrSpeed, float delay, int loopCount, bool pingPong, AnimationCurve animationCurve, OnAnimationCompleteCallback onAnimationCompleteCallback = null) { _DurationOrSpeed = durationOrSpeed; _Delay = delay; _LoopCount = loopCount; _PingPong = pingPong; _Type = EaseType.Linear; _UseAnimationCurve = true; _AnimationCurve = animationCurve; pOnTweenCompleteCallback = onAnimationCompleteCallback; }
public void SetData(float deltaMove, float delay, int loopCount, bool pingPong, bool useAnimationCurve, AnimationCurve animationCurve, CustomCurve customAnimationCurve, OnAnimationCompleteCallback onAnimationCompleteCallback) { mDeltaMove = deltaMove; mDelay = delay; mLoopCount = loopCount == 0 ? 1 : loopCount; mPingPong = pingPong; mAnimationCurve = animationCurve; mCustomAnimationCurve = customAnimationCurve; pState = TweenState.RUNNING; useAnimationCurve = mUseAnimationCurve; pOnAnimationCompleteCallback = onAnimationCompleteCallback; }
public static void PlayAnim(GameObject tweenObject, string name, OnAnimationCompleteCallback onAnimationCompleteCallback = null) { Animation anim = tweenObject.GetComponent <Animation>(); if (anim == null) { Debug.Log("Aniamtion component has not been attached to this game object: " + tweenObject.name); return; } Tweener tweener = new AnimatoinComp(tweenObject, anim, name); TweenUpdater.pTweeners.Add(tweener); }
public static void Shake2D(GameObject tweenObject, float duration, float shakeAmount, OnAnimationCompleteCallback onAnimationCompleteCallback = null) { Tweener tweener = new Shake2D(tweenObject, shakeAmount); float deltaMove = 1 / duration; tweener.SetData(deltaMove, 0, 1, false, false, null, null, onAnimationCompleteCallback); TweenUpdater.pTweeners.Add(tweener); }
public TweenParam(float durationOrSpeed, int loopCount, bool pingPong, AnimationCurve animationCurve, OnAnimationCompleteCallback onAnimationCompleteCallback = null) : this(durationOrSpeed, 0f, loopCount, pingPong, animationCurve, onAnimationCompleteCallback) { }
public TweenParam(float durationOrSpeed, float delay, bool pingPong, AnimationCurve animationCurve, OnAnimationCompleteCallback onAnimationCompleteCallback = null) : this(durationOrSpeed, delay, 1, pingPong, animationCurve, onAnimationCompleteCallback) { }
public TweenParam(float durationOrSpeed, float delay, int loopCount, AnimationCurve animationCurve, OnAnimationCompleteCallback onAnimationCompleteCallback = null) : this(durationOrSpeed, delay, loopCount, false, animationCurve, onAnimationCompleteCallback) { }
public TweenParam(float durationOrSpeed, AnimationCurve animationCurve, OnAnimationCompleteCallback onAnimationCompleteCallback = null) : this(durationOrSpeed, 0f, animationCurve, onAnimationCompleteCallback) { }
public TweenParam(float durationOrSpeed, bool pingPong, EaseType type, OnAnimationCompleteCallback onAnimationCompleteCallback = null) : this(durationOrSpeed, 0f, 1, pingPong, type, onAnimationCompleteCallback) { }
public TweenParam(float durationOrSpeed, int loopCount, EaseType type, OnAnimationCompleteCallback onAnimationCompleteCallback = null) : this(durationOrSpeed, 0f, loopCount, false, type, onAnimationCompleteCallback) { }
public TweenParam(float durationOrSpeed, float delay, EaseType type, OnAnimationCompleteCallback onAnimationCompleteCallback = null) : this(durationOrSpeed, delay, 1, false, type, onAnimationCompleteCallback) { }
public TweenParam(float durationOrSpeed, OnAnimationCompleteCallback onAnimationCompleteCallback = null) : this(durationOrSpeed, 0f, 1, false, EaseType.Linear, onAnimationCompleteCallback) { }