mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Tween
Tween
This commit is contained in:
3
Assets/TEngine/Scripts/Runtime/Tween.meta
Normal file
3
Assets/TEngine/Scripts/Runtime/Tween.meta
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5706f02a9c7e44eb9c3f396b41b9dacb
|
||||||
|
timeCreated: 1662436078
|
3
Assets/TEngine/Scripts/Runtime/Tween/LeanTween.meta
Normal file
3
Assets/TEngine/Scripts/Runtime/Tween/LeanTween.meta
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ea9fb858be9144b89a627d98021cb528
|
||||||
|
timeCreated: 1662436089
|
3058
Assets/TEngine/Scripts/Runtime/Tween/LeanTween/LTDescr.cs
Normal file
3058
Assets/TEngine/Scripts/Runtime/Tween/LeanTween/LTDescr.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 19a231fa00d6487a9113784fb3dbee73
|
||||||
|
timeCreated: 1662436159
|
@@ -0,0 +1,81 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace TEngine.Runtime
|
||||||
|
{
|
||||||
|
public class LTDescrOptional
|
||||||
|
{
|
||||||
|
public Transform toTrans { get; set; }
|
||||||
|
public Vector3 point { get; set; }
|
||||||
|
public Vector3 axis { get; set; }
|
||||||
|
public float lastVal { get; set; }
|
||||||
|
public Quaternion origRotation { get; set; }
|
||||||
|
public LTBezierPath path { get; set; }
|
||||||
|
public LTSpline spline { get; set; }
|
||||||
|
public AnimationCurve animationCurve;
|
||||||
|
public int initFrameCount;
|
||||||
|
|
||||||
|
public LTRect ltRect { get; set; } // maybe get rid of this eventually
|
||||||
|
|
||||||
|
public Action<float> onUpdateFloat { get; set; }
|
||||||
|
public Action<float, float> onUpdateFloatRatio { get; set; }
|
||||||
|
public Action<float, object> onUpdateFloatObject { get; set; }
|
||||||
|
public Action<Vector2> onUpdateVector2 { get; set; }
|
||||||
|
public Action<Vector3> onUpdateVector3 { get; set; }
|
||||||
|
public Action<Vector3, object> onUpdateVector3Object { get; set; }
|
||||||
|
public Action<Color> onUpdateColor { get; set; }
|
||||||
|
public Action<Color, object> onUpdateColorObject { get; set; }
|
||||||
|
public Action onComplete { get; set; }
|
||||||
|
public Action<object> onCompleteObject { get; set; }
|
||||||
|
public object onCompleteParam { get; set; }
|
||||||
|
public object onUpdateParam { get; set; }
|
||||||
|
public Action onStart { get; set; }
|
||||||
|
|
||||||
|
public void reset()
|
||||||
|
{
|
||||||
|
animationCurve = null;
|
||||||
|
|
||||||
|
this.onUpdateFloat = null;
|
||||||
|
this.onUpdateFloatRatio = null;
|
||||||
|
this.onUpdateVector2 = null;
|
||||||
|
this.onUpdateVector3 = null;
|
||||||
|
this.onUpdateFloatObject = null;
|
||||||
|
this.onUpdateVector3Object = null;
|
||||||
|
this.onUpdateColor = null;
|
||||||
|
this.onComplete = null;
|
||||||
|
this.onCompleteObject = null;
|
||||||
|
this.onCompleteParam = null;
|
||||||
|
this.onStart = null;
|
||||||
|
|
||||||
|
this.point = Vector3.zero;
|
||||||
|
this.initFrameCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void callOnUpdate(float val, float ratioPassed)
|
||||||
|
{
|
||||||
|
if (this.onUpdateFloat != null)
|
||||||
|
this.onUpdateFloat(val);
|
||||||
|
|
||||||
|
if (this.onUpdateFloatRatio != null)
|
||||||
|
{
|
||||||
|
this.onUpdateFloatRatio(val, ratioPassed);
|
||||||
|
}
|
||||||
|
else if (this.onUpdateFloatObject != null)
|
||||||
|
{
|
||||||
|
this.onUpdateFloatObject(val, this.onUpdateParam);
|
||||||
|
}
|
||||||
|
else if (this.onUpdateVector3Object != null)
|
||||||
|
{
|
||||||
|
this.onUpdateVector3Object(LTDescr.newVect, this.onUpdateParam);
|
||||||
|
}
|
||||||
|
else if (this.onUpdateVector3 != null)
|
||||||
|
{
|
||||||
|
this.onUpdateVector3(LTDescr.newVect);
|
||||||
|
}
|
||||||
|
else if (this.onUpdateVector2 != null)
|
||||||
|
{
|
||||||
|
this.onUpdateVector2(new Vector2(LTDescr.newVect.x, LTDescr.newVect.y));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1df5224162d94d92be2fbaa51f1d02d5
|
||||||
|
timeCreated: 1662436185
|
170
Assets/TEngine/Scripts/Runtime/Tween/LeanTween/LTSeq.cs
Normal file
170
Assets/TEngine/Scripts/Runtime/Tween/LeanTween/LTSeq.cs
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace TEngine.Runtime
|
||||||
|
{
|
||||||
|
public class LTSeq
|
||||||
|
{
|
||||||
|
public LTSeq previous;
|
||||||
|
|
||||||
|
public LTSeq current;
|
||||||
|
|
||||||
|
public LTDescr tween;
|
||||||
|
|
||||||
|
public float totalDelay;
|
||||||
|
|
||||||
|
public float timeScale;
|
||||||
|
|
||||||
|
private int debugIter;
|
||||||
|
|
||||||
|
public uint counter;
|
||||||
|
|
||||||
|
public bool toggle = false;
|
||||||
|
|
||||||
|
private uint _id;
|
||||||
|
|
||||||
|
public int id
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
uint toId = _id | counter << 16;
|
||||||
|
|
||||||
|
uint backId = toId & 0xFFFF;
|
||||||
|
uint backCounter = toId >> 16;
|
||||||
|
if (_id != backId || backCounter != counter)
|
||||||
|
{
|
||||||
|
Debug.LogError("BAD CONVERSION toId:" + _id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (int)toId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reset()
|
||||||
|
{
|
||||||
|
previous = null;
|
||||||
|
tween = null;
|
||||||
|
totalDelay = 0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void init(uint id, uint global_counter)
|
||||||
|
{
|
||||||
|
reset();
|
||||||
|
_id = id;
|
||||||
|
|
||||||
|
counter = global_counter;
|
||||||
|
|
||||||
|
this.current = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private LTSeq addOn()
|
||||||
|
{
|
||||||
|
this.current.toggle = true;
|
||||||
|
LTSeq lastCurrent = this.current;
|
||||||
|
this.current = LeanTween.sequence(true);
|
||||||
|
this.current.previous = lastCurrent;
|
||||||
|
lastCurrent.toggle = false;
|
||||||
|
this.current.totalDelay = lastCurrent.totalDelay;
|
||||||
|
this.current.debugIter = lastCurrent.debugIter + 1;
|
||||||
|
return current;
|
||||||
|
}
|
||||||
|
|
||||||
|
private float addPreviousDelays()
|
||||||
|
{
|
||||||
|
LTSeq prev = this.current.previous;
|
||||||
|
|
||||||
|
if (prev != null && prev.tween != null)
|
||||||
|
{
|
||||||
|
return this.current.totalDelay + prev.tween.time;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.current.totalDelay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LTSeq append(float delay)
|
||||||
|
{
|
||||||
|
this.current.totalDelay += delay;
|
||||||
|
|
||||||
|
return this.current;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LTSeq append(System.Action callback)
|
||||||
|
{
|
||||||
|
LTDescr newTween = LeanTween.delayedCall(0f, callback);
|
||||||
|
return append(newTween);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LTSeq append(System.Action<object> callback, object obj)
|
||||||
|
{
|
||||||
|
append(LeanTween.delayedCall(0f, callback).setOnCompleteParam(obj));
|
||||||
|
|
||||||
|
return addOn();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LTSeq append(GameObject gameObject, System.Action callback)
|
||||||
|
{
|
||||||
|
append(LeanTween.delayedCall(gameObject, 0f, callback));
|
||||||
|
|
||||||
|
return addOn();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LTSeq append(GameObject gameObject, System.Action<object> callback, object obj)
|
||||||
|
{
|
||||||
|
append(LeanTween.delayedCall(gameObject, 0f, callback).setOnCompleteParam(obj));
|
||||||
|
|
||||||
|
return addOn();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public LTSeq append(LTDescr tween)
|
||||||
|
{
|
||||||
|
this.current.tween = tween;
|
||||||
|
|
||||||
|
this.current.totalDelay = addPreviousDelays();
|
||||||
|
|
||||||
|
tween.setDelay(this.current.totalDelay);
|
||||||
|
|
||||||
|
return addOn();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LTSeq insert(LTDescr tween)
|
||||||
|
{
|
||||||
|
this.current.tween = tween;
|
||||||
|
|
||||||
|
tween.setDelay(addPreviousDelays());
|
||||||
|
|
||||||
|
return addOn();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public LTSeq setScale(float timeScale)
|
||||||
|
{
|
||||||
|
setScaleRecursive(this.current, timeScale, 500);
|
||||||
|
|
||||||
|
return addOn();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setScaleRecursive(LTSeq seq, float timeScale, int count)
|
||||||
|
{
|
||||||
|
if (count > 0)
|
||||||
|
{
|
||||||
|
this.timeScale = timeScale;
|
||||||
|
|
||||||
|
seq.totalDelay *= timeScale;
|
||||||
|
if (seq.tween != null)
|
||||||
|
{
|
||||||
|
if (seq.tween.time != 0f)
|
||||||
|
seq.tween.setTime(seq.tween.time * timeScale);
|
||||||
|
seq.tween.setDelay(seq.tween.delay * timeScale);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (seq.previous != null)
|
||||||
|
setScaleRecursive(seq.previous, timeScale, count - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public LTSeq reverse()
|
||||||
|
{
|
||||||
|
return addOn();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3dcd1d4c824c4a69aae05d9138d2780a
|
||||||
|
timeCreated: 1662436219
|
4604
Assets/TEngine/Scripts/Runtime/Tween/LeanTween/LeanTween.cs
Normal file
4604
Assets/TEngine/Scripts/Runtime/Tween/LeanTween/LeanTween.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 471c8208c40441e59ecfecc63cdbc58f
|
||||||
|
timeCreated: 1662436119
|
476
Assets/TEngine/Scripts/Runtime/Tween/LeanTween/LeanTweenExt.cs
Normal file
476
Assets/TEngine/Scripts/Runtime/Tween/LeanTween/LeanTweenExt.cs
Normal file
@@ -0,0 +1,476 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace TEngine.Runtime
|
||||||
|
{
|
||||||
|
public static class LeanTweenExt
|
||||||
|
{
|
||||||
|
public static LTDescr LeanAlpha(this GameObject gameObject, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.alpha(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanAlphaVertex(this GameObject gameObject, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.alphaVertex(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanAlpha(this RectTransform rectTransform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.alpha(rectTransform, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanAlpha(this CanvasGroup canvas, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.alphaCanvas(canvas, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanAlphaText(this RectTransform rectTransform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.alphaText(rectTransform, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void LeanCancel(this GameObject gameObject)
|
||||||
|
{
|
||||||
|
LeanTween.cancel(gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void LeanCancel(this GameObject gameObject, bool callOnComplete)
|
||||||
|
{
|
||||||
|
LeanTween.cancel(gameObject, callOnComplete);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void LeanCancel(this GameObject gameObject, int uniqueId, bool callOnComplete = false)
|
||||||
|
{
|
||||||
|
LeanTween.cancel(gameObject, uniqueId, callOnComplete);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void LeanCancel(this RectTransform rectTransform)
|
||||||
|
{
|
||||||
|
LeanTween.cancel(rectTransform);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanColor(this GameObject gameObject, Color to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.color(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanColorText(this RectTransform rectTransform, Color to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.colorText(rectTransform, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanDelayedCall(this GameObject gameObject, float delayTime, System.Action callback)
|
||||||
|
{
|
||||||
|
return LeanTween.delayedCall(gameObject, delayTime, callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanDelayedCall(this GameObject gameObject, float delayTime,
|
||||||
|
System.Action<object> callback)
|
||||||
|
{
|
||||||
|
return LeanTween.delayedCall(gameObject, delayTime, callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool LeanIsPaused(this GameObject gameObject)
|
||||||
|
{
|
||||||
|
return LeanTween.isPaused(gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool LeanIsPaused(this RectTransform rectTransform)
|
||||||
|
{
|
||||||
|
return LeanTween.isPaused(rectTransform);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool LeanIsTweening(this GameObject gameObject)
|
||||||
|
{
|
||||||
|
return LeanTween.isTweening(gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMove(this GameObject gameObject, Vector3 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.move(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMove(this Transform transform, Vector3 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.move(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMove(this RectTransform rectTransform, Vector3 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.move(rectTransform, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMove(this GameObject gameObject, Vector2 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.move(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMove(this Transform transform, Vector2 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.move(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMove(this GameObject gameObject, Vector3[] to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.move(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMove(this GameObject gameObject, LTBezierPath to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.move(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMove(this GameObject gameObject, LTSpline to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.move(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMove(this Transform transform, Vector3[] to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.move(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMove(this Transform transform, LTBezierPath to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.move(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMove(this Transform transform, LTSpline to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.move(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveLocal(this GameObject gameObject, Vector3 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveLocal(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveLocal(this GameObject gameObject, LTBezierPath to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveLocal(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveLocal(this GameObject gameObject, LTSpline to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveLocal(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveLocal(this Transform transform, Vector3 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveLocal(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveLocal(this Transform transform, LTBezierPath to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveLocal(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveLocal(this Transform transform, LTSpline to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveLocal(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveLocalX(this GameObject gameObject, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveLocalX(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveLocalY(this GameObject gameObject, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveLocalY(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveLocalZ(this GameObject gameObject, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveLocalZ(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveLocalX(this Transform transform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveLocalX(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveLocalY(this Transform transform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveLocalY(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveLocalZ(this Transform transform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveLocalZ(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveSpline(this GameObject gameObject, Vector3[] to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveSpline(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveSpline(this GameObject gameObject, LTSpline to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveSpline(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveSpline(this Transform transform, Vector3[] to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveSpline(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveSpline(this Transform transform, LTSpline to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveSpline(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveSplineLocal(this GameObject gameObject, Vector3[] to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveSplineLocal(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveSplineLocal(this Transform transform, Vector3[] to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveSplineLocal(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveX(this GameObject gameObject, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveX(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveX(this Transform transform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveX(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveX(this RectTransform rectTransform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveX(rectTransform, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveY(this GameObject gameObject, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveY(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveY(this Transform transform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveY(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveY(this RectTransform rectTransform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveY(rectTransform, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveZ(this GameObject gameObject, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveZ(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveZ(this Transform transform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveZ(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanMoveZ(this RectTransform rectTransform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.moveZ(rectTransform, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void LeanPause(this GameObject gameObject)
|
||||||
|
{
|
||||||
|
LeanTween.pause(gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanPlay(this RectTransform rectTransform, UnityEngine.Sprite[] sprites)
|
||||||
|
{
|
||||||
|
return LeanTween.play(rectTransform, sprites);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void LeanResume(this GameObject gameObject)
|
||||||
|
{
|
||||||
|
LeanTween.resume(gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanRotate(this GameObject gameObject, Vector3 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.rotate(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanRotate(this Transform transform, Vector3 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.rotate(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanRotate(this RectTransform rectTransform, Vector3 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.rotate(rectTransform, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanRotateAround(this GameObject gameObject, Vector3 axis, float add, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.rotateAround(gameObject, axis, add, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanRotateAround(this Transform transform, Vector3 axis, float add, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.rotateAround(transform.gameObject, axis, add, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanRotateAround(this RectTransform rectTransform, Vector3 axis, float add, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.rotateAround(rectTransform, axis, add, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanRotateAroundLocal(this GameObject gameObject, Vector3 axis, float add, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.rotateAroundLocal(gameObject, axis, add, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanRotateAroundLocal(this Transform transform, Vector3 axis, float add, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.rotateAroundLocal(transform.gameObject, axis, add, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanRotateAroundLocal(this RectTransform rectTransform, Vector3 axis, float add,
|
||||||
|
float time)
|
||||||
|
{
|
||||||
|
return LeanTween.rotateAroundLocal(rectTransform, axis, add, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanRotateX(this GameObject gameObject, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.rotateX(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanRotateX(this Transform transform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.rotateX(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanRotateY(this GameObject gameObject, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.rotateY(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanRotateY(this Transform transform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.rotateY(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanRotateZ(this GameObject gameObject, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.rotateZ(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanRotateZ(this Transform transform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.rotateZ(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanScale(this GameObject gameObject, Vector3 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.scale(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanScale(this Transform transform, Vector3 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.scale(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanScale(this RectTransform rectTransform, Vector3 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.scale(rectTransform, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanScaleX(this GameObject gameObject, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.scaleX(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanScaleX(this Transform transform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.scaleX(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanScaleY(this GameObject gameObject, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.scaleY(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanScaleY(this Transform transform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.scaleY(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanScaleZ(this GameObject gameObject, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.scaleZ(gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanScaleZ(this Transform transform, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.scaleZ(transform.gameObject, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanSize(this RectTransform rectTransform, Vector2 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.size(rectTransform, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanValue(this GameObject gameObject, Color from, Color to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.value(gameObject, from, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanValue(this GameObject gameObject, float from, float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.value(gameObject, from, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanValue(this GameObject gameObject, Vector2 from, Vector2 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.value(gameObject, from, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanValue(this GameObject gameObject, Vector3 from, Vector3 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.value(gameObject, from, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanValue(this GameObject gameObject, Action<float> callOnUpdate, float from, float to,
|
||||||
|
float time)
|
||||||
|
{
|
||||||
|
return LeanTween.value(gameObject, callOnUpdate, from, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanValue(this GameObject gameObject, Action<float, float> callOnUpdate, float from,
|
||||||
|
float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.value(gameObject, callOnUpdate, from, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanValue(this GameObject gameObject, Action<float, object> callOnUpdate, float from,
|
||||||
|
float to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.value(gameObject, callOnUpdate, from, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanValue(this GameObject gameObject, Action<Color> callOnUpdate, Color from, Color to,
|
||||||
|
float time)
|
||||||
|
{
|
||||||
|
return LeanTween.value(gameObject, callOnUpdate, from, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanValue(this GameObject gameObject, Action<Vector2> callOnUpdate, Vector2 from,
|
||||||
|
Vector2 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.value(gameObject, callOnUpdate, from, to, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LTDescr LeanValue(this GameObject gameObject, Action<Vector3> callOnUpdate, Vector3 from,
|
||||||
|
Vector3 to, float time)
|
||||||
|
{
|
||||||
|
return LeanTween.value(gameObject, callOnUpdate, from, to, time);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 662c46873dd34229b5b29957fbed3945
|
||||||
|
timeCreated: 1662444795
|
7
Assets/TResources/UI/TestUI.prefab.meta
Normal file
7
Assets/TResources/UI/TestUI.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6fd5a1bdc9ff3364dab9ceb6d0e26fed
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Reference in New Issue
Block a user