|
@@ -34,36 +34,36 @@ public delegate Color CurveFunctionC(float timer, float duration, Color start, C
|
|
|
|
|
|
public delegate Vector3 CurveFunctionV(float timer, float duration, Vector3 start, Vector3 delta);
|
|
|
|
|
|
-public class ManaAnim : Regist
|
|
|
+public class ManaAnim : Regist
|
|
|
{
|
|
|
#region 变量
|
|
|
|
|
|
- public static List<Move> MoveList;
|
|
|
- public static List<Tween> TweenForList;
|
|
|
- public static List<Tween> TweenBacList;
|
|
|
-
|
|
|
- public static Dictionary<Curve, ShakeFunctionF> ShakeFuncDicF;
|
|
|
- public static Dictionary<Curve, ShakeFunctionC> ShakeFuncDicC;
|
|
|
- public static Dictionary<Curve, ShakeFunctionV> ShakeFuncDicV;
|
|
|
-
|
|
|
- public static Dictionary<Curve, CurveFunctionF> CurveFuncDicF;
|
|
|
- public static Dictionary<Curve, CurveFunctionC> CurveFuncDicC;
|
|
|
- public static Dictionary<Curve, CurveFunctionV> CurveFuncDicV;
|
|
|
-
|
|
|
- public static Dictionary<Transform, Shake> ShakeDic;
|
|
|
- public static Dictionary<Transform, Move2D> MoveDic2D;
|
|
|
- public static Dictionary<Transform, Move3D> MoveDic3D;
|
|
|
- public static Dictionary<Transform, Zoom2D> ZoomDic2D;
|
|
|
-
|
|
|
- public static Dictionary<Transform, TweenSr> TweenSrDic;
|
|
|
- public static Dictionary<Transform, TweenCG> TweenCgDic;
|
|
|
- public static Dictionary<Transform, TweenGra> TweenGraDic;
|
|
|
- public static Dictionary<Transform, TweenVec> TweenVecDic;
|
|
|
- public static Dictionary<Transform, TweenText> TweenTextDic;
|
|
|
- public static Dictionary<Transform, TweenRect> TweenRectDic;
|
|
|
- public static Dictionary<Transform, TweenScale> TweenScaleDic;
|
|
|
- public static Dictionary<Transform, TweenAudio> TweenAudioDic;
|
|
|
- public static Dictionary<Transform, TweenNumber> TweenNumberDic;
|
|
|
+ public static List<Move> MoveList = new List<Move>();
|
|
|
+ public static List<Tween> TweenForList = new List<Tween>();
|
|
|
+ public static List<Tween> TweenBacList = new List<Tween>();
|
|
|
+
|
|
|
+ public static Dictionary<Curve, ShakeFunctionF> ShakeFuncDicF = new Dictionary<Curve, ShakeFunctionF>();
|
|
|
+ public static Dictionary<Curve, ShakeFunctionC> ShakeFuncDicC = new Dictionary<Curve, ShakeFunctionC>();
|
|
|
+ public static Dictionary<Curve, ShakeFunctionV> ShakeFuncDicV = new Dictionary<Curve, ShakeFunctionV>();
|
|
|
+
|
|
|
+ public static Dictionary<Curve, CurveFunctionF> CurveFuncDicF = new Dictionary<Curve, CurveFunctionF>();
|
|
|
+ public static Dictionary<Curve, CurveFunctionC> CurveFuncDicC = new Dictionary<Curve, CurveFunctionC>();
|
|
|
+ public static Dictionary<Curve, CurveFunctionV> CurveFuncDicV = new Dictionary<Curve, CurveFunctionV>();
|
|
|
+
|
|
|
+ public static Dictionary<Transform, Shake> ShakeDic = new Dictionary<Transform, Shake>();
|
|
|
+ public static Dictionary<Transform, Move2D> MoveDic2D = new Dictionary<Transform, Move2D>();
|
|
|
+ public static Dictionary<Transform, Move3D> MoveDic3D = new Dictionary<Transform, Move3D>();
|
|
|
+ public static Dictionary<Transform, Zoom2D> ZoomDic2D = new Dictionary<Transform, Zoom2D>();
|
|
|
+
|
|
|
+ public static Dictionary<Transform, TweenSr> TweenSrDic = new Dictionary<Transform, TweenSr>();
|
|
|
+ public static Dictionary<Transform, TweenCG> TweenCgDic = new Dictionary<Transform, TweenCG>();
|
|
|
+ public static Dictionary<Transform, TweenGra> TweenGraDic = new Dictionary<Transform, TweenGra>();
|
|
|
+ public static Dictionary<Transform, TweenVec> TweenVecDic = new Dictionary<Transform, TweenVec>();
|
|
|
+ public static Dictionary<Transform, TweenText> TweenTextDic = new Dictionary<Transform, TweenText>();
|
|
|
+ public static Dictionary<Transform, TweenRect> TweenRectDic = new Dictionary<Transform, TweenRect>();
|
|
|
+ public static Dictionary<Transform, TweenScale> TweenScaleDic = new Dictionary<Transform, TweenScale>();
|
|
|
+ public static Dictionary<Transform, TweenAudio> TweenAudioDic = new Dictionary<Transform, TweenAudio>();
|
|
|
+ public static Dictionary<Transform, TweenNumber> TweenNumberDic = new Dictionary<Transform, TweenNumber>();
|
|
|
|
|
|
#endregion
|
|
|
|
|
@@ -73,7 +73,7 @@ public class ManaAnim : Regist
|
|
|
{
|
|
|
if (MoveList[i].Do())
|
|
|
{
|
|
|
- i--;
|
|
|
+ MoveList.RemoveAt(i--);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -81,7 +81,7 @@ public class ManaAnim : Regist
|
|
|
{
|
|
|
if (TweenForList[i].DoForward())
|
|
|
{
|
|
|
- i--;
|
|
|
+ TweenForList.RemoveAt(i--);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -89,7 +89,7 @@ public class ManaAnim : Regist
|
|
|
{
|
|
|
if (TweenBacList[i].DoBackward())
|
|
|
{
|
|
|
- i--;
|
|
|
+ TweenBacList.RemoveAt(i--);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -97,33 +97,6 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public override void RegistImmed()
|
|
|
{
|
|
|
- MoveList = new List<Move>();
|
|
|
- TweenForList = new List<Tween>();
|
|
|
- TweenBacList = new List<Tween>();
|
|
|
-
|
|
|
- ShakeFuncDicF = new Dictionary<Curve, ShakeFunctionF>();
|
|
|
- ShakeFuncDicC = new Dictionary<Curve, ShakeFunctionC>();
|
|
|
- ShakeFuncDicV = new Dictionary<Curve, ShakeFunctionV>();
|
|
|
-
|
|
|
- CurveFuncDicF = new Dictionary<Curve, CurveFunctionF>();
|
|
|
- CurveFuncDicC = new Dictionary<Curve, CurveFunctionC>();
|
|
|
- CurveFuncDicV = new Dictionary<Curve, CurveFunctionV>();
|
|
|
-
|
|
|
- ShakeDic = new Dictionary<Transform, Shake>();
|
|
|
- MoveDic3D = new Dictionary<Transform, Move3D>();
|
|
|
- MoveDic2D = new Dictionary<Transform, Move2D>();
|
|
|
- ZoomDic2D = new Dictionary<Transform, Zoom2D>();
|
|
|
-
|
|
|
- TweenSrDic = new Dictionary<Transform, TweenSr>();
|
|
|
- TweenCgDic = new Dictionary<Transform, TweenCG>();
|
|
|
- TweenGraDic = new Dictionary<Transform, TweenGra>();
|
|
|
- TweenVecDic = new Dictionary<Transform, TweenVec>();
|
|
|
- TweenTextDic = new Dictionary<Transform, TweenText>();
|
|
|
- TweenRectDic = new Dictionary<Transform, TweenRect>();
|
|
|
- TweenScaleDic = new Dictionary<Transform, TweenScale>();
|
|
|
- TweenAudioDic = new Dictionary<Transform, TweenAudio>();
|
|
|
- TweenNumberDic = new Dictionary<Transform, TweenNumber>();
|
|
|
-
|
|
|
ShakeFuncDicF.Add(Curve.Linear, ShakeLinear);
|
|
|
ShakeFuncDicF.Add(Curve.EaseOutQuad, ShakeEaseOutQuad);
|
|
|
|
|
@@ -148,7 +121,7 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static float LinearTimer(float value, float duration, float start, float delta)
|
|
|
{
|
|
|
- return (value - start) * duration / delta;
|
|
|
+ return (value - start)*duration/delta;
|
|
|
}
|
|
|
|
|
|
public static float EaseOutQuadTimer(float value, float duration, float start, float delta)
|
|
@@ -168,7 +141,7 @@ public class ManaAnim : Regist
|
|
|
return start;
|
|
|
}
|
|
|
|
|
|
- if (timer <= (i + 1) * sliceTime)
|
|
|
+ if (timer <= (i + 1)*sliceTime)
|
|
|
{
|
|
|
timer -= (i)*sliceTime;
|
|
|
|
|
@@ -193,32 +166,32 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static Color ShakeLinear(float timer, float duration, int repeat, Color start, Color strength)
|
|
|
{
|
|
|
- float sliceTime = duration / (4 * repeat);
|
|
|
+ float sliceTime = duration/(4*repeat);
|
|
|
|
|
|
- for (int i = 0; i < repeat * 4; i += 4)
|
|
|
+ for (int i = 0; i < repeat*4; i += 4)
|
|
|
{
|
|
|
if (timer > duration)
|
|
|
{
|
|
|
return start;
|
|
|
}
|
|
|
|
|
|
- if (timer <= (i + 1) * sliceTime)
|
|
|
+ if (timer <= (i + 1)*sliceTime)
|
|
|
{
|
|
|
- timer -= (i) * sliceTime;
|
|
|
+ timer -= (i)*sliceTime;
|
|
|
|
|
|
- return Linear(timer, sliceTime, start, strength / (i / 4 + 1));
|
|
|
+ return Linear(timer, sliceTime, start, strength/(i/4 + 1));
|
|
|
}
|
|
|
- else if (timer <= (i + 3) * sliceTime)
|
|
|
+ else if (timer <= (i + 3)*sliceTime)
|
|
|
{
|
|
|
- timer -= (i + 1) * sliceTime;
|
|
|
+ timer -= (i + 1)*sliceTime;
|
|
|
|
|
|
- return Linear(timer, 2 * sliceTime, start + strength / (i / 4 + 1), -2 * strength / (i / 4 + 1));
|
|
|
+ return Linear(timer, 2*sliceTime, start + strength/(i/4 + 1), -2*strength/(i/4 + 1));
|
|
|
}
|
|
|
- else if (timer <= (i + 4) * sliceTime)
|
|
|
+ else if (timer <= (i + 4)*sliceTime)
|
|
|
{
|
|
|
- timer -= (i + 3) * sliceTime;
|
|
|
+ timer -= (i + 3)*sliceTime;
|
|
|
|
|
|
- return Linear(timer, sliceTime, start - strength / (i / 4 + 1), strength / (i / 4 + 1));
|
|
|
+ return Linear(timer, sliceTime, start - strength/(i/4 + 1), strength/(i/4 + 1));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -227,32 +200,32 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static Vector3 ShakeLinear(float timer, float duration, int repeat, Vector3 start, Vector3 strength)
|
|
|
{
|
|
|
- float sliceTime = duration / (4 * repeat);
|
|
|
+ float sliceTime = duration/(4*repeat);
|
|
|
|
|
|
- for (int i = 0; i < repeat * 4; i += 4)
|
|
|
+ for (int i = 0; i < repeat*4; i += 4)
|
|
|
{
|
|
|
if (timer > duration)
|
|
|
{
|
|
|
return start;
|
|
|
}
|
|
|
|
|
|
- if (timer <= (i + 1) * sliceTime)
|
|
|
+ if (timer <= (i + 1)*sliceTime)
|
|
|
{
|
|
|
- timer -= (i) * sliceTime;
|
|
|
+ timer -= (i)*sliceTime;
|
|
|
|
|
|
- return Linear(timer, sliceTime, start, strength / (i / 4 + 1));
|
|
|
+ return Linear(timer, sliceTime, start, strength/(i/4 + 1));
|
|
|
}
|
|
|
- else if (timer <= (i + 3) * sliceTime)
|
|
|
+ else if (timer <= (i + 3)*sliceTime)
|
|
|
{
|
|
|
- timer -= (i + 1) * sliceTime;
|
|
|
+ timer -= (i + 1)*sliceTime;
|
|
|
|
|
|
- return Linear(timer, 2 * sliceTime, start + strength / (i / 4 + 1), -2 * strength / (i / 4 + 1));
|
|
|
+ return Linear(timer, 2*sliceTime, start + strength/(i/4 + 1), -2*strength/(i/4 + 1));
|
|
|
}
|
|
|
- else if (timer <= (i + 4) * sliceTime)
|
|
|
+ else if (timer <= (i + 4)*sliceTime)
|
|
|
{
|
|
|
- timer -= (i + 3) * sliceTime;
|
|
|
+ timer -= (i + 3)*sliceTime;
|
|
|
|
|
|
- return Linear(timer, sliceTime, start - strength / (i / 4 + 1), strength / (i / 4 + 1));
|
|
|
+ return Linear(timer, sliceTime, start - strength/(i/4 + 1), strength/(i/4 + 1));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -262,32 +235,32 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static float ShakeEaseOutQuad(float timer, float duration, int repeat, float start, float strength)
|
|
|
{
|
|
|
- float sliceTime = duration / (4 * repeat);
|
|
|
+ float sliceTime = duration/(4*repeat);
|
|
|
|
|
|
- for (int i = 0; i < repeat * 4; i += 4)
|
|
|
+ for (int i = 0; i < repeat*4; i += 4)
|
|
|
{
|
|
|
if (timer > duration)
|
|
|
{
|
|
|
return start;
|
|
|
}
|
|
|
|
|
|
- if (timer <= (i + 1) * sliceTime)
|
|
|
+ if (timer <= (i + 1)*sliceTime)
|
|
|
{
|
|
|
- timer -= (i) * sliceTime;
|
|
|
+ timer -= (i)*sliceTime;
|
|
|
|
|
|
- return EaseOutQuad(timer, sliceTime, start, strength / (i / 4 + 1));
|
|
|
+ return EaseOutQuad(timer, sliceTime, start, strength/(i/4 + 1));
|
|
|
}
|
|
|
- else if (timer <= (i + 3) * sliceTime)
|
|
|
+ else if (timer <= (i + 3)*sliceTime)
|
|
|
{
|
|
|
- timer -= (i + 1) * sliceTime;
|
|
|
+ timer -= (i + 1)*sliceTime;
|
|
|
|
|
|
- return EaseOutQuad(timer, 2 * sliceTime, start + strength / (i / 4 + 1), -2 * strength / (i / 4 + 1));
|
|
|
+ return EaseOutQuad(timer, 2*sliceTime, start + strength/(i/4 + 1), -2*strength/(i/4 + 1));
|
|
|
}
|
|
|
- else if (timer <= (i + 4) * sliceTime)
|
|
|
+ else if (timer <= (i + 4)*sliceTime)
|
|
|
{
|
|
|
- timer -= (i + 3) * sliceTime;
|
|
|
+ timer -= (i + 3)*sliceTime;
|
|
|
|
|
|
- return EaseOutQuad(timer, sliceTime, start - strength / (i / 4 + 1), strength / (i / 4 + 1));
|
|
|
+ return EaseOutQuad(timer, sliceTime, start - strength/(i/4 + 1), strength/(i/4 + 1));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -296,32 +269,32 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static Color ShakeEaseOutQuad(float timer, float duration, int repeat, Color start, Color strength)
|
|
|
{
|
|
|
- float sliceTime = duration / (4 * repeat);
|
|
|
+ float sliceTime = duration/(4*repeat);
|
|
|
|
|
|
- for (int i = 0; i < repeat * 4; i += 4)
|
|
|
+ for (int i = 0; i < repeat*4; i += 4)
|
|
|
{
|
|
|
if (timer > duration)
|
|
|
{
|
|
|
return start;
|
|
|
}
|
|
|
|
|
|
- if (timer <= (i + 1) * sliceTime)
|
|
|
+ if (timer <= (i + 1)*sliceTime)
|
|
|
{
|
|
|
- timer -= (i) * sliceTime;
|
|
|
+ timer -= (i)*sliceTime;
|
|
|
|
|
|
- return EaseOutQuad(timer, sliceTime, start, strength / (i / 4 + 1));
|
|
|
+ return EaseOutQuad(timer, sliceTime, start, strength/(i/4 + 1));
|
|
|
}
|
|
|
- else if (timer <= (i + 3) * sliceTime)
|
|
|
+ else if (timer <= (i + 3)*sliceTime)
|
|
|
{
|
|
|
- timer -= (i + 1) * sliceTime;
|
|
|
+ timer -= (i + 1)*sliceTime;
|
|
|
|
|
|
- return EaseOutQuad(timer, 2 * sliceTime, start + strength / (i / 4 + 1), -2 * strength / (i / 4 + 1));
|
|
|
+ return EaseOutQuad(timer, 2*sliceTime, start + strength/(i/4 + 1), -2*strength/(i/4 + 1));
|
|
|
}
|
|
|
- else if (timer <= (i + 4) * sliceTime)
|
|
|
+ else if (timer <= (i + 4)*sliceTime)
|
|
|
{
|
|
|
- timer -= (i + 3) * sliceTime;
|
|
|
+ timer -= (i + 3)*sliceTime;
|
|
|
|
|
|
- return EaseOutQuad(timer, sliceTime, start - strength / (i / 4 + 1), strength / (i / 4 + 1));
|
|
|
+ return EaseOutQuad(timer, sliceTime, start - strength/(i/4 + 1), strength/(i/4 + 1));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -330,32 +303,32 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static Vector3 ShakeEaseOutQuad(float timer, float duration, int repeat, Vector3 start, Vector3 strength)
|
|
|
{
|
|
|
- float sliceTime = duration / (4 * repeat);
|
|
|
+ float sliceTime = duration/(4*repeat);
|
|
|
|
|
|
- for (int i = 0; i < repeat * 4; i += 4)
|
|
|
+ for (int i = 0; i < repeat*4; i += 4)
|
|
|
{
|
|
|
if (timer > duration)
|
|
|
{
|
|
|
return start;
|
|
|
}
|
|
|
|
|
|
- if (timer <= (i + 1) * sliceTime)
|
|
|
+ if (timer <= (i + 1)*sliceTime)
|
|
|
{
|
|
|
- timer -= (i) * sliceTime;
|
|
|
+ timer -= (i)*sliceTime;
|
|
|
|
|
|
- return EaseOutQuad(timer, sliceTime, start, strength / (i / 4 + 1));
|
|
|
+ return EaseOutQuad(timer, sliceTime, start, strength/(i/4 + 1));
|
|
|
}
|
|
|
- else if (timer <= (i + 3) * sliceTime)
|
|
|
+ else if (timer <= (i + 3)*sliceTime)
|
|
|
{
|
|
|
- timer -= (i + 1) * sliceTime;
|
|
|
+ timer -= (i + 1)*sliceTime;
|
|
|
|
|
|
- return EaseOutQuad(timer, 2 * sliceTime, start + strength / (i / 4 + 1), -2 * strength / (i / 4 + 1));
|
|
|
+ return EaseOutQuad(timer, 2*sliceTime, start + strength/(i/4 + 1), -2*strength/(i/4 + 1));
|
|
|
}
|
|
|
- else if (timer <= (i + 4) * sliceTime)
|
|
|
+ else if (timer <= (i + 4)*sliceTime)
|
|
|
{
|
|
|
- timer -= (i + 3) * sliceTime;
|
|
|
+ timer -= (i + 3)*sliceTime;
|
|
|
|
|
|
- return EaseOutQuad(timer, sliceTime, start - strength / (i / 4 + 1), strength / (i / 4 + 1));
|
|
|
+ return EaseOutQuad(timer, sliceTime, start - strength/(i/4 + 1), strength/(i/4 + 1));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -371,7 +344,7 @@ public class ManaAnim : Regist
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- return delta * timer / duration + start;
|
|
|
+ return delta*timer/duration + start;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -396,7 +369,7 @@ public class ManaAnim : Regist
|
|
|
{
|
|
|
timer /= duration;
|
|
|
|
|
|
- return -delta * timer * (timer - 2) + start;
|
|
|
+ return -delta*timer*(timer - 2) + start;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -977,7 +950,7 @@ public class ManaAnim : Regist
|
|
|
public static TweenGra TweenConBacGra(Transform target)
|
|
|
{
|
|
|
TweenGra tween;
|
|
|
-
|
|
|
+
|
|
|
if (TweenGraDic.TryGetValue(target, out tween))
|
|
|
{
|
|
|
tween.ConfineBackward();
|
|
@@ -1092,11 +1065,11 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static Shake GetShake(Transform target)
|
|
|
{
|
|
|
- Shake shake;
|
|
|
+ Shake move;
|
|
|
|
|
|
- if (ShakeDic.TryGetValue(target, out shake))
|
|
|
+ if (ShakeDic.TryGetValue(target, out move))
|
|
|
{
|
|
|
- return shake;
|
|
|
+ return move;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1106,11 +1079,11 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static Move2D GetMove2D(Transform target)
|
|
|
{
|
|
|
- Move2D move2D;
|
|
|
+ Move2D move;
|
|
|
|
|
|
- if (MoveDic2D.TryGetValue(target, out move2D))
|
|
|
+ if (MoveDic2D.TryGetValue(target, out move))
|
|
|
{
|
|
|
- return move2D;
|
|
|
+ return move;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1120,11 +1093,11 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static Move3D GetMove3D(Transform target)
|
|
|
{
|
|
|
- Move3D move3D;
|
|
|
+ Move3D move;
|
|
|
|
|
|
- if (MoveDic3D.TryGetValue(target, out move3D))
|
|
|
+ if (MoveDic3D.TryGetValue(target, out move))
|
|
|
{
|
|
|
- return move3D;
|
|
|
+ return move;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1149,11 +1122,11 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static TweenSr GetTweenSr(Transform target)
|
|
|
{
|
|
|
- TweenSr tweenSr;
|
|
|
+ TweenSr tween;
|
|
|
|
|
|
- if (TweenSrDic.TryGetValue(target, out tweenSr))
|
|
|
+ if (TweenSrDic.TryGetValue(target, out tween))
|
|
|
{
|
|
|
- return tweenSr;
|
|
|
+ return tween;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1163,11 +1136,11 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static TweenCG GetTweenCG(Transform target)
|
|
|
{
|
|
|
- TweenCG tweenCG;
|
|
|
+ TweenCG tween;
|
|
|
|
|
|
- if (TweenCgDic.TryGetValue(target, out tweenCG))
|
|
|
+ if (TweenCgDic.TryGetValue(target, out tween))
|
|
|
{
|
|
|
- return tweenCG;
|
|
|
+ return tween;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1177,11 +1150,11 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static TweenGra GetTweenGra(Transform target)
|
|
|
{
|
|
|
- TweenGra tweenGra;
|
|
|
+ TweenGra tween;
|
|
|
|
|
|
- if (TweenGraDic.TryGetValue(target, out tweenGra))
|
|
|
+ if (TweenGraDic.TryGetValue(target, out tween))
|
|
|
{
|
|
|
- return tweenGra;
|
|
|
+ return tween;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1191,11 +1164,11 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static TweenVec GetTweenVec(Transform target)
|
|
|
{
|
|
|
- TweenVec tweenVec;
|
|
|
+ TweenVec tween;
|
|
|
|
|
|
- if (TweenVecDic.TryGetValue(target, out tweenVec))
|
|
|
+ if (TweenVecDic.TryGetValue(target, out tween))
|
|
|
{
|
|
|
- return tweenVec;
|
|
|
+ return tween;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1205,11 +1178,11 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static TweenText GetTweenText(Transform target)
|
|
|
{
|
|
|
- TweenText tweenText;
|
|
|
+ TweenText tween;
|
|
|
|
|
|
- if (TweenTextDic.TryGetValue(target, out tweenText))
|
|
|
+ if (TweenTextDic.TryGetValue(target, out tween))
|
|
|
{
|
|
|
- return tweenText;
|
|
|
+ return tween;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1219,11 +1192,11 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static TweenRect GetTweenRect(Transform target)
|
|
|
{
|
|
|
- TweenRect tweenRect;
|
|
|
+ TweenRect tween;
|
|
|
|
|
|
- if (TweenRectDic.TryGetValue(target, out tweenRect))
|
|
|
+ if (TweenRectDic.TryGetValue(target, out tween))
|
|
|
{
|
|
|
- return tweenRect;
|
|
|
+ return tween;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1233,11 +1206,11 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static TweenScale GetTweenScale(Transform target)
|
|
|
{
|
|
|
- TweenScale tweenScale;
|
|
|
+ TweenScale tween;
|
|
|
|
|
|
- if (TweenScaleDic.TryGetValue(target, out tweenScale))
|
|
|
+ if (TweenScaleDic.TryGetValue(target, out tween))
|
|
|
{
|
|
|
- return tweenScale;
|
|
|
+ return tween;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1360,7 +1333,7 @@ public class ManaAnim : Regist
|
|
|
|
|
|
public static TweenSr CreateTweenSr(Transform target, float originAlpha, float destinationAlpha, float duration, bool originActive, bool destActive, Curve curve, bool cg = false, bool group = false)
|
|
|
{
|
|
|
- TweenSr tween;
|
|
|
+ TweenSr tweenSr;
|
|
|
SpriteRenderer sr = target.GetComponent<SpriteRenderer>();
|
|
|
|
|
|
Color origin = sr.color;
|
|
@@ -1371,25 +1344,25 @@ public class ManaAnim : Regist
|
|
|
|
|
|
if (TweenSrDic.ContainsKey(target))
|
|
|
{
|
|
|
- tween = TweenSrDic[target];
|
|
|
+ tweenSr = TweenSrDic[target];
|
|
|
|
|
|
- tween = new TweenSr(sr, origin, destination, duration, originActive, destActive, curve, cg, group);
|
|
|
+ tweenSr = new TweenSr(sr, origin, destination, duration, originActive, destActive, curve, cg, group);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenSr;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- tween = new TweenSr(sr, origin, destination, duration, originActive, destActive, curve, cg, group);
|
|
|
+ tweenSr = new TweenSr(sr, origin, destination, duration, originActive, destActive, curve, cg, group);
|
|
|
|
|
|
- TweenSrDic.Add(target, tween);
|
|
|
+ TweenSrDic.Add(target, tweenSr);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenSr;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public static TweenSr CreateTweenSr(Transform target, float destinationAlpha, float duration, bool originActive, bool destActive, Curve curve, bool cg = false, bool group = false)
|
|
|
{
|
|
|
- TweenSr tween;
|
|
|
+ TweenSr tweenSr;
|
|
|
SpriteRenderer sr = target.GetComponent<SpriteRenderer>();
|
|
|
|
|
|
Color destination = sr.color;
|
|
@@ -1398,122 +1371,120 @@ public class ManaAnim : Regist
|
|
|
|
|
|
if (TweenSrDic.ContainsKey(target))
|
|
|
{
|
|
|
- tween = TweenSrDic[target];
|
|
|
+ tweenSr = TweenSrDic[target];
|
|
|
|
|
|
- tween = new TweenSr(sr, sr.color, destination, duration, originActive, destActive, curve, cg, group);
|
|
|
+ tweenSr = new TweenSr(sr, sr.color, destination, duration, originActive, destActive, curve, cg, group);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenSr;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- tween = new TweenSr(sr, sr.color, destination, duration, originActive, destActive, curve, cg, group);
|
|
|
+ tweenSr = new TweenSr(sr, sr.color, destination, duration, originActive, destActive, curve, cg, group);
|
|
|
|
|
|
- TweenSrDic.Add(target, tween);
|
|
|
+ TweenSrDic.Add(target, tweenSr);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenSr;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public static TweenSr CreateTweenSr(Transform target, Color origin, Color destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false, bool group=false)
|
|
|
+ public static TweenSr CreateTweenSr(Transform target, Color origin, Color destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false, bool group = false)
|
|
|
{
|
|
|
+ TweenSr tweenSr;
|
|
|
+ SpriteRenderer sr = target.GetComponent<SpriteRenderer>();
|
|
|
+
|
|
|
if (TweenSrDic.ContainsKey(target))
|
|
|
{
|
|
|
- SpriteRenderer sr = target.GetComponent<SpriteRenderer>();
|
|
|
-
|
|
|
- TweenSr tween = TweenSrDic[target];
|
|
|
+ tweenSr = TweenSrDic[target];
|
|
|
|
|
|
- tween = new TweenSr(sr, origin, destination, duration, originActive, destActive, curve, cg, group);
|
|
|
+ tweenSr = new TweenSr(sr, origin, destination, duration, originActive, destActive, curve, cg, group);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenSr;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- SpriteRenderer sr = target.GetComponent<SpriteRenderer>();
|
|
|
-
|
|
|
- TweenSr tween = new TweenSr(sr, origin, destination, duration, originActive, destActive, curve, cg, group);
|
|
|
+ tweenSr = new TweenSr(sr, origin, destination, duration, originActive, destActive, curve, cg, group);
|
|
|
|
|
|
- TweenSrDic.Add(target, tween);
|
|
|
+ TweenSrDic.Add(target, tweenSr);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenSr;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public static TweenSr CreateTweenSr(Transform target, Color destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false, bool group=false)
|
|
|
+ public static TweenSr CreateTweenSr(Transform target, Color destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false, bool group = false)
|
|
|
{
|
|
|
+ TweenSr tweenSr;
|
|
|
+ SpriteRenderer sr = target.GetComponent<SpriteRenderer>();
|
|
|
+
|
|
|
if (TweenSrDic.ContainsKey(target))
|
|
|
{
|
|
|
- SpriteRenderer sr = target.GetComponent<SpriteRenderer>();
|
|
|
-
|
|
|
- TweenSr tween = TweenSrDic[target];
|
|
|
+ tweenSr = TweenSrDic[target];
|
|
|
|
|
|
- tween = new TweenSr(sr, sr.color, destination, duration, originActive, destActive, curve, cg, group);
|
|
|
+ tweenSr = new TweenSr(sr, sr.color, destination, duration, originActive, destActive, curve, cg, group);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenSr;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- SpriteRenderer sr = target.GetComponent<SpriteRenderer>();
|
|
|
+ tweenSr = new TweenSr(sr, sr.color, destination, duration, originActive, destActive, curve, cg, group);
|
|
|
|
|
|
- TweenSr tween = new TweenSr(sr, sr.color, destination, duration, originActive, destActive, curve, cg, group);
|
|
|
+ TweenSrDic.Add(target, tweenSr);
|
|
|
|
|
|
- TweenSrDic.Add(target, tween);
|
|
|
-
|
|
|
- return tween;
|
|
|
+ return tweenSr;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
|
|
|
- public static TweenCG CreateTweenCG(Transform target, float origin, float destination, float duration, bool originActive, bool destActive, Curve curve)
|
|
|
+ public static TweenCG CreateTweenCG(Transform target, float origin, float destination, float duration, bool originActive, bool destActive, Curve curve)
|
|
|
{
|
|
|
+ TweenCG tweenCg;
|
|
|
+ CanvasGroup cg = target.GetComponent<CanvasGroup>();
|
|
|
+
|
|
|
if (TweenCgDic.ContainsKey(target))
|
|
|
{
|
|
|
- CanvasGroup cg = target.GetComponent<CanvasGroup>();
|
|
|
+ tweenCg = TweenCgDic[target];
|
|
|
|
|
|
- TweenCG tween = TweenCgDic[target];
|
|
|
+ tweenCg = new TweenCG(cg, origin, destination, duration, originActive, destActive, curve);
|
|
|
|
|
|
- tween = new TweenCG(cg, origin, destination, duration, originActive, destActive, curve);
|
|
|
-
|
|
|
- return tween;
|
|
|
+ return tweenCg;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- CanvasGroup cg = target.GetComponent<CanvasGroup>();
|
|
|
+ tweenCg = new TweenCG(cg, origin, destination, duration, originActive, destActive, curve);
|
|
|
|
|
|
- TweenCG tween = new TweenCG(cg, origin, destination, duration, originActive, destActive, curve);
|
|
|
+ TweenCgDic.Add(target, tweenCg);
|
|
|
|
|
|
- TweenCgDic.Add(target, tween);
|
|
|
-
|
|
|
- return tween;
|
|
|
+ return tweenCg;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public static TweenCG CreateTweenCG(Transform target, float destination, float duration, bool originActive, bool destActive, Curve curve)
|
|
|
{
|
|
|
+ TweenCG tweenCg;
|
|
|
+ CanvasGroup cg = target.GetComponent<CanvasGroup>();
|
|
|
+
|
|
|
if (TweenCgDic.ContainsKey(target))
|
|
|
{
|
|
|
- CanvasGroup cg = target.GetComponent<CanvasGroup>();
|
|
|
-
|
|
|
- TweenCG tween = TweenCgDic[target];
|
|
|
+ tweenCg = TweenCgDic[target];
|
|
|
|
|
|
- tween = new TweenCG(cg, cg.alpha, destination, duration, originActive, destActive, curve);
|
|
|
+ tweenCg = new TweenCG(cg, cg.alpha, destination, duration, originActive, destActive, curve);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenCg;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- CanvasGroup cg = target.GetComponent<CanvasGroup>();
|
|
|
-
|
|
|
- TweenCG tween = new TweenCG(cg, cg.alpha, destination, duration, originActive, destActive, curve);
|
|
|
+ tweenCg = new TweenCG(cg, cg.alpha, destination, duration, originActive, destActive, curve);
|
|
|
|
|
|
- TweenCgDic.Add(target, tween);
|
|
|
+ TweenCgDic.Add(target, tweenCg);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenCg;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
public static TweenGra CreateTweenGra(Transform target, float originAlpha, float destinationAlpha, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
Graphic graphic = target.GetComponent<Graphic>();
|
|
|
- TweenGra tween;
|
|
|
+ TweenGra tweenGra;
|
|
|
|
|
|
Color origin = graphic.color;
|
|
|
Color destination = graphic.color;
|
|
@@ -1523,26 +1494,26 @@ public class ManaAnim : Regist
|
|
|
|
|
|
if (TweenGraDic.ContainsKey(target))
|
|
|
{
|
|
|
- tween = TweenGraDic[target];
|
|
|
+ tweenGra = TweenGraDic[target];
|
|
|
|
|
|
- tween = new TweenGra(graphic, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenGra = new TweenGra(graphic, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenGra;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- tween = new TweenGra(graphic, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenGra = new TweenGra(graphic, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenGraDic.Add(target, tween);
|
|
|
+ TweenGraDic.Add(target, tweenGra);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenGra;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public static TweenGra CreateTweenGra(Transform target, float destinationAlpha, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
Graphic graphic = target.GetComponent<Graphic>();
|
|
|
- TweenGra tween;
|
|
|
+ TweenGra tweenGra;
|
|
|
|
|
|
Color destination = graphic.color;
|
|
|
|
|
@@ -1550,408 +1521,421 @@ public class ManaAnim : Regist
|
|
|
|
|
|
if (TweenGraDic.ContainsKey(target))
|
|
|
{
|
|
|
- tween = TweenGraDic[target];
|
|
|
+ tweenGra = TweenGraDic[target];
|
|
|
|
|
|
- tween = new TweenGra(graphic, graphic.color, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenGra = new TweenGra(graphic, graphic.color, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenGra;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- tween = new TweenGra(graphic, graphic.color, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenGra = new TweenGra(graphic, graphic.color, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenGraDic.Add(target, tween);
|
|
|
+ TweenGraDic.Add(target, tweenGra);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenGra;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public static TweenGra CreateTweenGra(Transform target, Color origin, Color destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
+ Graphic graphic = target.GetComponent<Graphic>();
|
|
|
+ TweenGra tweenGra;
|
|
|
+
|
|
|
if (TweenGraDic.ContainsKey(target))
|
|
|
{
|
|
|
- Graphic graphic = target.GetComponent<Graphic>();
|
|
|
-
|
|
|
- TweenGra tween = TweenGraDic[target];
|
|
|
+ tweenGra = TweenGraDic[target];
|
|
|
|
|
|
- tween = new TweenGra(graphic, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenGra = new TweenGra(graphic, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenGra;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- Graphic graphic = target.GetComponent<Graphic>();
|
|
|
+ tweenGra = new TweenGra(graphic, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenGra tween = new TweenGra(graphic, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ TweenGraDic.Add(target, tweenGra);
|
|
|
|
|
|
- TweenGraDic.Add(target, tween);
|
|
|
-
|
|
|
- return tween;
|
|
|
+ return tweenGra;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public static TweenGra CreateTweenGra(Transform target, Color destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
+ Graphic graphic = target.GetComponent<Graphic>();
|
|
|
+ TweenGra tweenGra;
|
|
|
+
|
|
|
if (TweenGraDic.ContainsKey(target))
|
|
|
{
|
|
|
- Graphic graphic = target.GetComponent<Graphic>();
|
|
|
-
|
|
|
- TweenGra tween = TweenGraDic[target];
|
|
|
+ tweenGra = TweenGraDic[target];
|
|
|
|
|
|
- tween = new TweenGra(graphic, graphic.color, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenGra = new TweenGra(graphic, graphic.color, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenGra;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- Graphic graphic = target.GetComponent<Graphic>();
|
|
|
+ tweenGra = new TweenGra(graphic, graphic.color, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenGra tween = new TweenGra(graphic, graphic.color, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ TweenGraDic.Add(target, tweenGra);
|
|
|
|
|
|
- TweenGraDic.Add(target, tween);
|
|
|
-
|
|
|
- return tween;
|
|
|
+ return tweenGra;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
public static TweenVec CreateTweenVec2D(Transform target, Vector3 origin, Vector3 destination, float duration, bool local, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
+ TweenVec tweenVec2D;
|
|
|
+
|
|
|
origin.z = target.position.z;
|
|
|
destination.z = target.position.z;
|
|
|
|
|
|
if (TweenVecDic.ContainsKey(target))
|
|
|
{
|
|
|
- TweenVec tween = TweenVecDic[target];
|
|
|
+ tweenVec2D = TweenVecDic[target];
|
|
|
|
|
|
- tween = new TweenVec(target, origin, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
+ tweenVec2D = new TweenVec(target, origin, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenVec2D;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- TweenVec tween = new TweenVec(target, origin, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
+ tweenVec2D = new TweenVec(target, origin, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenVecDic.Add(target, tween);
|
|
|
+ TweenVecDic.Add(target, tweenVec2D);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenVec2D;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public static TweenVec CreateTweenVec2D(Transform target, Vector3 destination, float duration, bool local, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
+ TweenVec tweenVec2D;
|
|
|
+
|
|
|
destination.z = target.position.z;
|
|
|
|
|
|
if (TweenVecDic.ContainsKey(target))
|
|
|
{
|
|
|
- TweenVec tween = TweenVecDic[target];
|
|
|
+ tweenVec2D = TweenVecDic[target];
|
|
|
|
|
|
if (local)
|
|
|
{
|
|
|
- tween = new TweenVec(target, target.localPosition, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
+ tweenVec2D = new TweenVec(target, target.localPosition, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- tween = new TweenVec(target, target.position, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
+ tweenVec2D = new TweenVec(target, target.position, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
}
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenVec2D;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- TweenVec tween;
|
|
|
-
|
|
|
if (local)
|
|
|
{
|
|
|
- tween = new TweenVec(target, target.localPosition, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
+ tweenVec2D = new TweenVec(target, target.localPosition, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- tween = new TweenVec(target, target.position, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
+ tweenVec2D = new TweenVec(target, target.position, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
}
|
|
|
|
|
|
- TweenVecDic.Add(target, tween);
|
|
|
+ TweenVecDic.Add(target, tweenVec2D);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenVec2D;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
public static TweenVec CreateTweenVec3D(Transform target, Vector3 origin, Vector3 destination, float duration, bool local, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
+ TweenVec tweenVec3D;
|
|
|
+
|
|
|
if (TweenVecDic.ContainsKey(target))
|
|
|
{
|
|
|
- TweenVec tween = TweenVecDic[target];
|
|
|
+ tweenVec3D = TweenVecDic[target];
|
|
|
|
|
|
- tween = new TweenVec(target, origin, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
+ tweenVec3D = new TweenVec(target, origin, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenVec3D;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- TweenVec tween = new TweenVec(target, origin, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
+ tweenVec3D = new TweenVec(target, origin, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenVecDic.Add(target, tween);
|
|
|
+ TweenVecDic.Add(target, tweenVec3D);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenVec3D;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public static TweenVec CreateTweenVec3D(Transform target, Vector3 destination, float duration, bool local, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
+ TweenVec tweenVec3D;
|
|
|
+
|
|
|
if (TweenVecDic.ContainsKey(target))
|
|
|
{
|
|
|
- TweenVec tween = TweenVecDic[target];
|
|
|
+ tweenVec3D = TweenVecDic[target];
|
|
|
|
|
|
if (local)
|
|
|
{
|
|
|
- tween = new TweenVec(target, target.localPosition, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
+ tweenVec3D = new TweenVec(target, target.localPosition, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- tween = new TweenVec(target, target.position, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
+ tweenVec3D = new TweenVec(target, target.position, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
}
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenVec3D;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- TweenVec tween;
|
|
|
-
|
|
|
if (local)
|
|
|
{
|
|
|
- tween = new TweenVec(target, target.localPosition, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
+ tweenVec3D = new TweenVec(target, target.localPosition, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- tween = new TweenVec(target, target.position, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
+ tweenVec3D = new TweenVec(target, target.position, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
}
|
|
|
|
|
|
- TweenVecDic.Add(target, tween);
|
|
|
+ TweenVecDic.Add(target, tweenVec3D);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenVec3D;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
public static TweenText CreateTweenText(Transform target, float origin, float destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
+ Text text = target.GetComponent<Text>();
|
|
|
+ TweenText tweenText;
|
|
|
+
|
|
|
if (TweenRectDic.ContainsKey(target))
|
|
|
{
|
|
|
- Text text = target.GetComponent<Text>();
|
|
|
-
|
|
|
- TweenText tween = TweenTextDic[target];
|
|
|
+ tweenText = TweenTextDic[target];
|
|
|
|
|
|
- tween = new TweenText(text, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenText = new TweenText(text, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenText;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- Text text = target.GetComponent<Text>();
|
|
|
-
|
|
|
- TweenText tween = new TweenText(text, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenText = new TweenText(text, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenTextDic.Add(target, tween);
|
|
|
+ TweenTextDic.Add(target, tweenText);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenText;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public static TweenText CreateTweenText(Transform target, float destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
+ Text text = target.GetComponent<Text>();
|
|
|
+ TweenText tweenText;
|
|
|
+
|
|
|
if (TweenRectDic.ContainsKey(target))
|
|
|
{
|
|
|
- Text text = target.GetComponent<Text>();
|
|
|
+ tweenText = TweenTextDic[target];
|
|
|
|
|
|
- TweenText tween = TweenTextDic[target];
|
|
|
+ tweenText = new TweenText(text, text.fontSize, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- tween = new TweenText(text, text.fontSize, destination, duration, originActive, destActive, curve, cg);
|
|
|
-
|
|
|
- return tween;
|
|
|
+ return tweenText;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- Text text = target.GetComponent<Text>();
|
|
|
-
|
|
|
- TweenText tween = new TweenText(text, text.fontSize, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenText = new TweenText(text, text.fontSize, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenTextDic.Add(target, tween);
|
|
|
+ TweenTextDic.Add(target, tweenText);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenText;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
public static TweenRect CreateTweenRect(Transform target, Vector2 origin, Vector2 destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
+ TweenRect tweenRect;
|
|
|
+ RectTransform rectTra = target.GetComponent<RectTransform>();
|
|
|
+
|
|
|
if (TweenRectDic.ContainsKey(target))
|
|
|
{
|
|
|
- RectTransform rectTra = target.GetComponent<RectTransform>();
|
|
|
+ tweenRect = TweenRectDic[target];
|
|
|
|
|
|
- TweenRect tween = TweenRectDic[target];
|
|
|
+ tweenRect = new TweenRect(rectTra, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- tween = new TweenRect(rectTra, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
-
|
|
|
- return tween;
|
|
|
+ return tweenRect;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- RectTransform rectTra = target.GetComponent<RectTransform>();
|
|
|
-
|
|
|
- TweenRect tween = new TweenRect(rectTra, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenRect = new TweenRect(rectTra, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenRectDic.Add(target, tween);
|
|
|
+ TweenRectDic.Add(target, tweenRect);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenRect;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public static TweenRect CreateTweenRect(Transform target, Vector2 destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
+ TweenRect tweenRect;
|
|
|
+ RectTransform rectTra = target.GetComponent<RectTransform>();
|
|
|
+
|
|
|
if (TweenRectDic.ContainsKey(target))
|
|
|
{
|
|
|
- RectTransform rectTra = target.GetComponent<RectTransform>();
|
|
|
+ tweenRect = TweenRectDic[target];
|
|
|
|
|
|
- TweenRect tween = TweenRectDic[target];
|
|
|
+ tweenRect = new TweenRect(rectTra, rectTra.rect.size, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- tween = new TweenRect(rectTra, rectTra.rect.size, destination, duration, originActive, destActive, curve, cg);
|
|
|
-
|
|
|
- return tween;
|
|
|
+ return tweenRect;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- RectTransform rectTra = target.GetComponent<RectTransform>();
|
|
|
-
|
|
|
- TweenRect tween = new TweenRect(rectTra, rectTra.rect.size, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenRect = new TweenRect(rectTra, rectTra.rect.size, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenRectDic.Add(target, tween);
|
|
|
+ TweenRectDic.Add(target, tweenRect);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenRect;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
public static TweenScale CreateTweenScale(Transform target, Vector3 origin, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
+ TweenScale tweenScale;
|
|
|
+
|
|
|
if (TweenScaleDic.ContainsKey(target))
|
|
|
{
|
|
|
- TweenScale tween = TweenScaleDic[target];
|
|
|
+ tweenScale = TweenScaleDic[target];
|
|
|
|
|
|
- tween = new TweenScale(target, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenScale = new TweenScale(target, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenScale;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- TweenScale tween = new TweenScale(target, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenScale = new TweenScale(target, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenScaleDic.Add(target, tween);
|
|
|
+ TweenScaleDic.Add(target, tweenScale);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenScale;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public static TweenScale CreateTweenScale(Transform target, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
+ TweenScale tweenScale;
|
|
|
+
|
|
|
if (TweenScaleDic.ContainsKey(target))
|
|
|
{
|
|
|
- TweenScale tween = TweenScaleDic[target];
|
|
|
+ tweenScale = TweenScaleDic[target];
|
|
|
|
|
|
- tween = new TweenScale(target, target.lossyScale, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenScale = new TweenScale(target, target.lossyScale, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenScale;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- TweenScale tween = new TweenScale(target, target.lossyScale, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenScale = new TweenScale(target, target.lossyScale, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenScaleDic.Add(target, tween);
|
|
|
+ TweenScaleDic.Add(target, tweenScale);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenScale;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
public static TweenAudio CreateTweenAudio(Transform target, float origin, float destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
+ TweenAudio tweenAudio;
|
|
|
+ AudioSource audio = target.GetComponent<AudioSource>();
|
|
|
+
|
|
|
if (TweenAudioDic.ContainsKey(target))
|
|
|
{
|
|
|
- TweenAudio tween = TweenAudioDic[target];
|
|
|
+ tweenAudio = TweenAudioDic[target];
|
|
|
|
|
|
- tween = new TweenAudio(target.GetComponent<AudioSource>(), origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenAudio = new TweenAudio(audio, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenAudio;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- TweenAudio tween = new TweenAudio(target.GetComponent<AudioSource>(), origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenAudio = new TweenAudio(audio, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenAudioDic.Add(target, tween);
|
|
|
+ TweenAudioDic.Add(target, tweenAudio);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenAudio;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public static TweenAudio CreateTweenAudio(Transform target, float destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
+ TweenAudio tweenAudio;
|
|
|
+ AudioSource audio = target.GetComponent<AudioSource>();
|
|
|
+
|
|
|
if (TweenAudioDic.ContainsKey(target))
|
|
|
{
|
|
|
- AudioSource audio = target.GetComponent<AudioSource>();
|
|
|
+ tweenAudio = TweenAudioDic[target];
|
|
|
|
|
|
- TweenAudio tween = TweenAudioDic[target];
|
|
|
+ tweenAudio = new TweenAudio(audio, audio.volume, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- tween = new TweenAudio(audio , audio.volume, destination, duration, originActive, destActive, curve, cg);
|
|
|
-
|
|
|
- return tween;
|
|
|
+ return tweenAudio;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- AudioSource audio = target.GetComponent<AudioSource>();
|
|
|
+ tweenAudio = new TweenAudio(audio, audio.volume, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenAudio tween = new TweenAudio(audio, audio.volume, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ TweenAudioDic.Add(target, tweenAudio);
|
|
|
|
|
|
- TweenAudioDic.Add(target, tween);
|
|
|
-
|
|
|
- return tween;
|
|
|
+ return tweenAudio;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
public static TweenNumber CreateTweenNumber(Transform target, int origin, int destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
+ Text text = target.GetComponent<Text>();
|
|
|
+ TweenNumber tweenNumber;
|
|
|
+
|
|
|
if (TweenNumberDic.ContainsKey(target))
|
|
|
{
|
|
|
- TweenNumber tween = TweenNumberDic[target];
|
|
|
+ tweenNumber = TweenNumberDic[target];
|
|
|
|
|
|
- tween = new TweenNumber(target.GetComponent<Text>(), origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenNumber = new TweenNumber(text, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenNumber;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- TweenNumber tween = new TweenNumber(target.GetComponent<Text>(), origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenNumber = new TweenNumber(text, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenNumberDic.Add(target, tween);
|
|
|
+ TweenNumberDic.Add(target, tweenNumber);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenNumber;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public static TweenNumber CreateTweenNumber(Transform target, int destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
+ Text text = target.GetComponent<Text>();
|
|
|
+ TweenNumber tweenNumber;
|
|
|
+
|
|
|
if (TweenNumberDic.ContainsKey(target))
|
|
|
{
|
|
|
- Text text = target.GetComponent<Text>();
|
|
|
-
|
|
|
- TweenNumber tween = TweenNumberDic[target];
|
|
|
+ tweenNumber = TweenNumberDic[target];
|
|
|
|
|
|
- tween = new TweenNumber(text, int.Parse(text.text), destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenNumber = new TweenNumber(text, int.Parse(text.text), destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenNumber;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- Text text = target.GetComponent<Text>();
|
|
|
-
|
|
|
- TweenNumber tween = new TweenNumber(text, int.Parse(text.text), destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenNumber = new TweenNumber(text, int.Parse(text.text), destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenNumberDic.Add(target, tween);
|
|
|
+ TweenNumberDic.Add(target, tweenNumber);
|
|
|
|
|
|
- return tween;
|
|
|
+ return tweenNumber;
|
|
|
}
|
|
|
}
|
|
|
|