public static ITween <Color32> color32PropertyTo(object self, string propertyName, Color32 to, float duration) { var tweenTarget = new PropertyTarget <Color32>(self, propertyName); var tween = ZestKit.cacheColor32Tweens ? QuickCache <Color32Tween> .pop() : new Color32Tween(); tween.initialize(tweenTarget, to, duration); return(tween); }
/// <summary> /// transform.localEulers tween /// </summary> /// <returns>The klocal eulers to.</returns> /// <param name="self">Self.</param> /// <param name="to">To.</param> /// <param name="duration">Duration.</param> public static ITween <Vector3> ZKlocalEulersTo(this Transform self, Vector3 to, float duration = 0.3f) { var tween = QuickCache <TransformVector3Tween> .pop(); tween.setTargetAndType(self, TransformTargetType.LocalEulerAngles); tween.initialize(tween, to, duration); return(tween); }
public static ITween <Vector4> vector4PropertyTo(object self, string propertyName, Vector4 to, float duration) { var tweenTarget = new PropertyTarget <Vector4>(self, propertyName); var tween = ZestKit.cacheVector4Tweens ? QuickCache <Vector4Tween> .pop() : new Vector4Tween(); tween.initialize(tweenTarget, to, duration); return(tween); }
public static ITween <Quaternion> quaternionPropertyTo(object self, string propertyName, Quaternion to, float duration) { var tweenTarget = new PropertyTarget <Quaternion>(self, propertyName); var tween = ZestKit.cacheQuaternionTweens ? QuickCache <QuaternionTween> .pop() : new QuaternionTween(); tween.initialize(tweenTarget, to, duration); return(tween); }
public static ITween <int> intPropertyTo(object self, string propertyName, int to, float duration) { var tweenTarget = new PropertyTarget <int>(self, propertyName); var tween = ZestKit.cacheIntTweens ? QuickCache <IntTween> .pop() : new IntTween(); tween.initialize(tweenTarget, to, duration); return(tween); }
/// <summary> /// calls the Action every repeatsDelay seconds. The ActionTask is automatically started for you. /// </summary> /// <param name="initialDelay">Initial delay.</param> /// <param name="repeatDelay">Repeat delay.</param> /// <param name="context">Context.</param> /// <param name="action">Action.</param> public static ActionTask every(float repeatDelay, object context, Action <ActionTask> action) { var task = QuickCache <ActionTask> .pop() .setAction(action) .setRepeats(repeatDelay) .setContext(context); task.start(); return(task); }
/// <summary> /// calls the action after an initial delay. The ActionTask is automatically started for you. /// </summary> /// <param name="initialDelay">Initial delay.</param> /// <param name="context">Context.</param> /// <param name="action">Action.</param> public static ActionTask afterDelay(float initialDelay, object context, Action <ActionTask> action) { var task = QuickCache <ActionTask> .pop() .setAction(action) .setDelay(initialDelay) .setContext(context); task.start(); return(task); }
public static FloatTween create() { return(ZestKit.cacheFloatTweens ? QuickCache <FloatTween> .pop() : new FloatTween()); }
public static RectTween create() { return(ZestKit.cacheRectTweens ? QuickCache <RectTween> .pop() : new RectTween()); }
public static Color32Tween create() { return(ZestKit.cacheColor32Tweens ? QuickCache <Color32Tween> .pop() : new Color32Tween()); }
public static QuaternionTween create() { return(ZestKit.cacheQuaternionTweens ? QuickCache <QuaternionTween> .pop() : new QuaternionTween()); }
public static Vector4Tween create() { return(ZestKit.cacheVector4Tweens ? QuickCache <Vector4Tween> .pop() : new Vector4Tween()); }
public static IntTween create() { return(ZestKit.cacheIntTweens ? QuickCache <IntTween> .pop() : new IntTween()); }
/// <summary> /// creates an ActionTask with a context but does not start it! /// </summary> /// <param name="context">Context.</param> /// <param name="action">Action.</param> public static ActionTask create(object context, Action <ActionTask> action) { return(QuickCache <ActionTask> .pop() .setAction(action) .setContext(context)); }
/// <summary> /// creates an ActionTask but does not start it! /// </summary> /// <param name="action">Action.</param> public static ActionTask create(Action <ActionTask> action) { return(QuickCache <ActionTask> .pop() .setAction(action)); }