|
@@ -64,7 +64,7 @@ public class ManaAnim : Regist
|
|
|
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, TweenFont> TweenFontDic = new Dictionary<Transform, TweenFont>();
|
|
|
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>();
|
|
@@ -428,98 +428,123 @@ public class ManaAnim : Regist
|
|
|
return move;
|
|
|
}
|
|
|
|
|
|
- public static Move2D Move2D(Transform target, Vector3 destination, float duration, bool local, bool offset, Curve curve)
|
|
|
+
|
|
|
+ public static Move2D Move2D(Transform target, Vector3 destination, float duration, bool local, Curve curve)
|
|
|
{
|
|
|
Move2D move;
|
|
|
|
|
|
- if (MoveDic2D.TryGetValue(target, out move))
|
|
|
+ if (local)
|
|
|
+ {
|
|
|
+ destination.z = target.localPosition.z;
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
- Vector3 dest = destination;
|
|
|
+ destination.z = target.position.z;
|
|
|
+ }
|
|
|
|
|
|
- if (offset)
|
|
|
- {
|
|
|
- if (local)
|
|
|
- {
|
|
|
- dest = target.localPosition + destination;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- dest = target.position + destination;
|
|
|
- }
|
|
|
- }
|
|
|
+ if (MoveDic2D.TryGetValue(target, out move))
|
|
|
+ {
|
|
|
+ move.StartMove(destination, duration, local, curve);
|
|
|
|
|
|
- move.StartMove(dest, duration, local, curve);
|
|
|
+ return move;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
move = CreateMove2D(target);
|
|
|
|
|
|
- Vector3 dest = destination;
|
|
|
-
|
|
|
- if (offset)
|
|
|
- {
|
|
|
- if (local)
|
|
|
- {
|
|
|
- dest = target.localPosition + destination;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- dest = target.position + destination;
|
|
|
- }
|
|
|
- }
|
|
|
+ move.StartMove(destination, duration, local, curve);
|
|
|
|
|
|
- move.StartMove(dest, duration, local, curve);
|
|
|
+ return move;
|
|
|
}
|
|
|
-
|
|
|
- return move;
|
|
|
}
|
|
|
|
|
|
- public static Move3D Move3D(Transform target, Vector3 destination, float duration, bool local, bool offset, Curve curve)
|
|
|
+ public static Move3D Move3D(Transform target, Vector3 destination, float duration, bool local, Curve curve)
|
|
|
{
|
|
|
Move3D move;
|
|
|
|
|
|
if (MoveDic3D.TryGetValue(target, out move))
|
|
|
{
|
|
|
- Vector3 dest = destination;
|
|
|
-
|
|
|
- if (offset)
|
|
|
- {
|
|
|
- if (local)
|
|
|
- {
|
|
|
- dest = target.localPosition + destination;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- dest = target.position + destination;
|
|
|
- }
|
|
|
- }
|
|
|
+ move.StartMove(destination, duration, local, curve);
|
|
|
|
|
|
- move.StartMove(dest, duration, local, curve);
|
|
|
+ return move;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
move = CreateMove3D(target);
|
|
|
|
|
|
- Vector3 dest = destination;
|
|
|
+ move.StartMove(destination, duration, local, curve);
|
|
|
|
|
|
- if (offset)
|
|
|
- {
|
|
|
- if (local)
|
|
|
- {
|
|
|
- dest = target.localPosition + destination;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- dest = target.position + destination;
|
|
|
- }
|
|
|
- }
|
|
|
+ return move;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static Move2D MoveOffset2D(Transform target, Vector3 offset, float duration, bool local, Curve curve)
|
|
|
+ {
|
|
|
+ Move2D move;
|
|
|
+
|
|
|
+ Vector3 destination;
|
|
|
+
|
|
|
+ if (local)
|
|
|
+ {
|
|
|
+ destination = target.localPosition + offset;
|
|
|
|
|
|
- move.StartMove(dest, duration, local, curve);
|
|
|
+ destination.z = target.localPosition.z;
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ destination = target.position + offset;
|
|
|
|
|
|
- return move;
|
|
|
+ destination.z = target.position.z;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (MoveDic2D.TryGetValue(target, out move))
|
|
|
+ {
|
|
|
+ move.StartMove(destination, duration, local, curve);
|
|
|
+
|
|
|
+ return move;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ move = CreateMove2D(target);
|
|
|
+
|
|
|
+ move.StartMove(destination, duration, local, curve);
|
|
|
+
|
|
|
+ return move;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+ public static Move3D MoveOffset3D(Transform target, Vector3 offset, float duration, bool local, Curve curve)
|
|
|
+ {
|
|
|
+ Move3D move;
|
|
|
+
|
|
|
+ Vector3 destination;
|
|
|
+
|
|
|
+ if (local)
|
|
|
+ {
|
|
|
+ destination = target.localPosition + offset;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ destination = target.position + offset;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (MoveDic3D.TryGetValue(target, out move))
|
|
|
+ {
|
|
|
+ move.StartMove(destination, duration, local, curve);
|
|
|
+
|
|
|
+ return move;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ move = CreateMove3D(target);
|
|
|
+
|
|
|
+ move.StartMove(destination, duration, local, curve);
|
|
|
+
|
|
|
+ return move;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
public static Zoom2D Zoom2D(Transform target, float origin, float destination, float duration, float stay, Transform targetZoom, Curve curve)
|
|
|
{
|
|
|
Zoom2D move;
|
|
@@ -623,11 +648,11 @@ public class ManaAnim : Regist
|
|
|
return tween;
|
|
|
}
|
|
|
|
|
|
- public static TweenText TweenForText(Transform target)
|
|
|
+ public static TweenFont TweenForFont(Transform target)
|
|
|
{
|
|
|
- TweenText tween;
|
|
|
+ TweenFont tween;
|
|
|
|
|
|
- if (TweenTextDic.TryGetValue(target, out tween))
|
|
|
+ if (TweenFontDic.TryGetValue(target, out tween))
|
|
|
{
|
|
|
tween.StartForward();
|
|
|
}
|
|
@@ -768,11 +793,11 @@ public class ManaAnim : Regist
|
|
|
return tween;
|
|
|
}
|
|
|
|
|
|
- public static TweenText TweenBacText(Transform target)
|
|
|
+ public static TweenFont TweenBacFont(Transform target)
|
|
|
{
|
|
|
- TweenText tween;
|
|
|
+ TweenFont tween;
|
|
|
|
|
|
- if (TweenTextDic.TryGetValue(target, out tween))
|
|
|
+ if (TweenFontDic.TryGetValue(target, out tween))
|
|
|
{
|
|
|
tween.StartBackward();
|
|
|
}
|
|
@@ -913,11 +938,11 @@ public class ManaAnim : Regist
|
|
|
return tween;
|
|
|
}
|
|
|
|
|
|
- public static TweenText TweenConForText(Transform target)
|
|
|
+ public static TweenFont TweenConForFont(Transform target)
|
|
|
{
|
|
|
- TweenText tween;
|
|
|
+ TweenFont tween;
|
|
|
|
|
|
- if (TweenTextDic.TryGetValue(target, out tween))
|
|
|
+ if (TweenFontDic.TryGetValue(target, out tween))
|
|
|
{
|
|
|
tween.ConfineForward();
|
|
|
}
|
|
@@ -1058,11 +1083,11 @@ public class ManaAnim : Regist
|
|
|
return tween;
|
|
|
}
|
|
|
|
|
|
- public static TweenText TweenConBacText(Transform target)
|
|
|
+ public static TweenFont TweenConBacFont(Transform target)
|
|
|
{
|
|
|
- TweenText tween;
|
|
|
+ TweenFont tween;
|
|
|
|
|
|
- if (TweenTextDic.TryGetValue(target, out tween))
|
|
|
+ if (TweenFontDic.TryGetValue(target, out tween))
|
|
|
{
|
|
|
tween.ConfineBackward();
|
|
|
}
|
|
@@ -1203,11 +1228,11 @@ public class ManaAnim : Regist
|
|
|
return tween;
|
|
|
}
|
|
|
|
|
|
- public static TweenText TweenReForText(Transform target)
|
|
|
+ public static TweenFont TweenReForFont(Transform target)
|
|
|
{
|
|
|
- TweenText tween;
|
|
|
+ TweenFont tween;
|
|
|
|
|
|
- if (TweenTextDic.TryGetValue(target, out tween))
|
|
|
+ if (TweenFontDic.TryGetValue(target, out tween))
|
|
|
{
|
|
|
tween.ReForward();
|
|
|
}
|
|
@@ -1348,11 +1373,11 @@ public class ManaAnim : Regist
|
|
|
return tween;
|
|
|
}
|
|
|
|
|
|
- public static TweenText TweenReBacText(Transform target)
|
|
|
+ public static TweenFont TweenReBacFont(Transform target)
|
|
|
{
|
|
|
- TweenText tween;
|
|
|
+ TweenFont tween;
|
|
|
|
|
|
- if (TweenTextDic.TryGetValue(target, out tween))
|
|
|
+ if (TweenFontDic.TryGetValue(target, out tween))
|
|
|
{
|
|
|
tween.ReBackward();
|
|
|
}
|
|
@@ -1595,11 +1620,11 @@ public class ManaAnim : Regist
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public static TweenText GetTweenText(Transform target)
|
|
|
+ public static TweenFont GetTweenFont(Transform target)
|
|
|
{
|
|
|
- TweenText tween;
|
|
|
+ TweenFont tween;
|
|
|
|
|
|
- if (TweenTextDic.TryGetValue(target, out tween))
|
|
|
+ if (TweenFontDic.TryGetValue(target, out tween))
|
|
|
{
|
|
|
return tween;
|
|
|
}
|
|
@@ -2007,8 +2032,16 @@ public class ManaAnim : Regist
|
|
|
{
|
|
|
TweenVec tweenVec2D;
|
|
|
|
|
|
- origin.z = target.position.z;
|
|
|
- destination.z = target.position.z;
|
|
|
+ if (local)
|
|
|
+ {
|
|
|
+ origin.z = target.localPosition.z;
|
|
|
+ destination.z = target.localPosition.z;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ origin.z = target.position.z;
|
|
|
+ destination.z = target.position.z;
|
|
|
+ }
|
|
|
|
|
|
if (TweenVecDic.ContainsKey(target))
|
|
|
{
|
|
@@ -2032,33 +2065,73 @@ public class ManaAnim : Regist
|
|
|
{
|
|
|
TweenVec tweenVec2D;
|
|
|
|
|
|
- destination.z = target.position.z;
|
|
|
+ Vector3 origin;
|
|
|
+
|
|
|
+ if (local)
|
|
|
+ {
|
|
|
+ origin = target.localPosition;
|
|
|
+
|
|
|
+ destination.z = target.localPosition.z;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ origin = target.position;
|
|
|
+
|
|
|
+ destination.z = target.position.z;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
if (TweenVecDic.ContainsKey(target))
|
|
|
{
|
|
|
tweenVec2D = TweenVecDic[target];
|
|
|
|
|
|
- if (local)
|
|
|
- {
|
|
|
- TweenVecDic[target] = new TweenVec(target, target.localPosition, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- TweenVecDic[target] = new TweenVec(target, target.position, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
- }
|
|
|
+ TweenVecDic[target] = new TweenVec(target, origin, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
|
|
|
return tweenVec2D;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (local)
|
|
|
- {
|
|
|
- tweenVec2D = new TweenVec(target, target.localPosition, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- tweenVec2D = new TweenVec(target, target.position, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
- }
|
|
|
+ tweenVec2D = new TweenVec(target, origin, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
+
|
|
|
+ TweenVecDic.Add(target, tweenVec2D);
|
|
|
+
|
|
|
+ return tweenVec2D;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static TweenVec CreateTweenVecOffset2D(Transform target, Vector3 offset, float duration, bool local, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
+ {
|
|
|
+ TweenVec tweenVec2D;
|
|
|
+
|
|
|
+ Vector3 origin;
|
|
|
+ Vector3 destination;
|
|
|
+
|
|
|
+ if (local)
|
|
|
+ {
|
|
|
+ origin = target.localPosition;
|
|
|
+ destination = target.localPosition + offset;
|
|
|
+
|
|
|
+ destination.z = target.localPosition.z;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ origin = target.position;
|
|
|
+ destination = target.position + offset;
|
|
|
+
|
|
|
+ destination.z = target.position.z;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (TweenVecDic.ContainsKey(target))
|
|
|
+ {
|
|
|
+ tweenVec2D = TweenVecDic[target];
|
|
|
+
|
|
|
+ TweenVecDic[target] = new TweenVec(target, origin, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
+
|
|
|
+ return tweenVec2D;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ tweenVec2D = new TweenVec(target, origin, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
|
|
|
TweenVecDic.Add(target, tweenVec2D);
|
|
|
|
|
@@ -2093,31 +2166,64 @@ public class ManaAnim : Regist
|
|
|
{
|
|
|
TweenVec tweenVec3D;
|
|
|
|
|
|
+ Vector3 origin;
|
|
|
+
|
|
|
+ if (local)
|
|
|
+ {
|
|
|
+ origin = target.localPosition;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ origin = target.position;
|
|
|
+ }
|
|
|
+
|
|
|
if (TweenVecDic.ContainsKey(target))
|
|
|
{
|
|
|
tweenVec3D = TweenVecDic[target];
|
|
|
|
|
|
- if (local)
|
|
|
- {
|
|
|
- TweenVecDic[target] = new TweenVec(target, target.localPosition, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- TweenVecDic[target] = new TweenVec(target, target.position, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
- }
|
|
|
+ TweenVecDic[target] = new TweenVec(target, origin, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
|
|
|
return tweenVec3D;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (local)
|
|
|
- {
|
|
|
- tweenVec3D = new TweenVec(target, target.localPosition, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- tweenVec3D = new TweenVec(target, target.position, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
- }
|
|
|
+ tweenVec3D = new TweenVec(target, origin, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
+
|
|
|
+ TweenVecDic.Add(target, tweenVec3D);
|
|
|
+
|
|
|
+ return tweenVec3D;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static TweenVec CreateTweenVecOffset3D(Transform target, Vector3 offset, float duration, bool local, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
+ {
|
|
|
+ TweenVec tweenVec3D;
|
|
|
+
|
|
|
+ Vector3 origin;
|
|
|
+ Vector3 destination;
|
|
|
+
|
|
|
+ if (local)
|
|
|
+ {
|
|
|
+ origin = target.localPosition;
|
|
|
+ destination = target.localPosition + offset;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ origin = target.position;
|
|
|
+ destination = target.position + offset;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (TweenVecDic.ContainsKey(target))
|
|
|
+ {
|
|
|
+ tweenVec3D = TweenVecDic[target];
|
|
|
+
|
|
|
+ TweenVecDic[target] = new TweenVec(target, origin, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
+
|
|
|
+ return tweenVec3D;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ tweenVec3D = new TweenVec(target, origin, destination, duration, local, originActive, destActive, curve, cg);
|
|
|
|
|
|
TweenVecDic.Add(target, tweenVec3D);
|
|
|
|
|
@@ -2126,49 +2232,49 @@ public class ManaAnim : Regist
|
|
|
}
|
|
|
|
|
|
|
|
|
- public static TweenText CreateTweenText(Transform target, int origin, int destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
+ public static TweenFont CreateTweenFont(Transform target, int origin, int destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
Text text = target.GetComponent<Text>();
|
|
|
- TweenText tweenText;
|
|
|
+ TweenFont tweenFont;
|
|
|
|
|
|
if (TweenRectDic.ContainsKey(target))
|
|
|
{
|
|
|
- tweenText = TweenTextDic[target];
|
|
|
+ tweenFont = TweenFontDic[target];
|
|
|
|
|
|
- TweenTextDic[target] = new TweenText(text, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ TweenFontDic[target] = new TweenFont(text, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- return tweenText;
|
|
|
+ return tweenFont;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- tweenText = new TweenText(text, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenFont = new TweenFont(text, origin, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenTextDic.Add(target, tweenText);
|
|
|
+ TweenFontDic.Add(target, tweenFont);
|
|
|
|
|
|
- return tweenText;
|
|
|
+ return tweenFont;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public static TweenText CreateTweenText(Transform target, int destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
+ public static TweenFont CreateTweenFont(Transform target, int destination, float duration, bool originActive, bool destActive, Curve curve, bool cg = false)
|
|
|
{
|
|
|
Text text = target.GetComponent<Text>();
|
|
|
- TweenText tweenText;
|
|
|
+ TweenFont tweenFont;
|
|
|
|
|
|
if (TweenRectDic.ContainsKey(target))
|
|
|
{
|
|
|
- tweenText = TweenTextDic[target];
|
|
|
+ tweenFont = TweenFontDic[target];
|
|
|
|
|
|
- TweenTextDic[target] = new TweenText(text, text.fontSize, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ TweenFontDic[target] = new TweenFont(text, text.fontSize, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- return tweenText;
|
|
|
+ return tweenFont;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- tweenText = new TweenText(text, text.fontSize, destination, duration, originActive, destActive, curve, cg);
|
|
|
+ tweenFont = new TweenFont(text, text.fontSize, destination, duration, originActive, destActive, curve, cg);
|
|
|
|
|
|
- TweenTextDic.Add(target, tweenText);
|
|
|
+ TweenFontDic.Add(target, tweenFont);
|
|
|
|
|
|
- return tweenText;
|
|
|
+ return tweenFont;
|
|
|
}
|
|
|
}
|
|
|
|