|
@@ -34,6 +34,7 @@ public class ManaAnim : MonoBehaviour
|
|
public static Dictionary<Transform, TweenCG> TweenCgDic;
|
|
public static Dictionary<Transform, TweenCG> TweenCgDic;
|
|
public static Dictionary<Transform, TweenGra> TweenGraDic;
|
|
public static Dictionary<Transform, TweenGra> TweenGraDic;
|
|
public static Dictionary<Transform, TweenVec> TweenVecDic;
|
|
public static Dictionary<Transform, TweenVec> TweenVecDic;
|
|
|
|
+ public static Dictionary<Transform, TweenRect> TweenRectDic;
|
|
public static Dictionary<Transform, TweenScale> TweenScaleDic;
|
|
public static Dictionary<Transform, TweenScale> TweenScaleDic;
|
|
public static Dictionary<Transform, TweenAudio> TweenAudioDic;
|
|
public static Dictionary<Transform, TweenAudio> TweenAudioDic;
|
|
|
|
|
|
@@ -86,6 +87,7 @@ public class ManaAnim : MonoBehaviour
|
|
TweenCgDic = new Dictionary<Transform, TweenCG>();
|
|
TweenCgDic = new Dictionary<Transform, TweenCG>();
|
|
TweenGraDic = new Dictionary<Transform, TweenGra>();
|
|
TweenGraDic = new Dictionary<Transform, TweenGra>();
|
|
TweenVecDic = new Dictionary<Transform, TweenVec>();
|
|
TweenVecDic = new Dictionary<Transform, TweenVec>();
|
|
|
|
+ TweenRectDic = new Dictionary<Transform, TweenRect>();
|
|
TweenScaleDic = new Dictionary<Transform, TweenScale>();
|
|
TweenScaleDic = new Dictionary<Transform, TweenScale>();
|
|
TweenAudioDic = new Dictionary<Transform, TweenAudio>();
|
|
TweenAudioDic = new Dictionary<Transform, TweenAudio>();
|
|
|
|
|
|
@@ -212,6 +214,20 @@ public class ManaAnim : MonoBehaviour
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public static void TweenForRect(Transform target)
|
|
|
|
+ {
|
|
|
|
+ TweenRect tweenRect;
|
|
|
|
+
|
|
|
|
+ if (TweenRectDic.TryGetValue(target, out tweenRect))
|
|
|
|
+ {
|
|
|
|
+ tweenRect.StartForward();
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ throw new Exception();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
public static void TweenForScale(Transform target)
|
|
public static void TweenForScale(Transform target)
|
|
{
|
|
{
|
|
TweenScale tweenScale;
|
|
TweenScale tweenScale;
|
|
@@ -283,6 +299,20 @@ public class ManaAnim : MonoBehaviour
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public static void TweenBacRect(Transform target)
|
|
|
|
+ {
|
|
|
|
+ TweenRect tweenRect;
|
|
|
|
+
|
|
|
|
+ if (TweenRectDic.TryGetValue(target, out tweenRect))
|
|
|
|
+ {
|
|
|
|
+ tweenRect.StartBackward();
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ throw new Exception();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
public static void TweenBacScale(Transform target)
|
|
public static void TweenBacScale(Transform target)
|
|
{
|
|
{
|
|
TweenScale tweenScale;
|
|
TweenScale tweenScale;
|
|
@@ -372,6 +402,20 @@ public class ManaAnim : MonoBehaviour
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public static TweenRect GetTweenRect(Transform target)
|
|
|
|
+ {
|
|
|
|
+ TweenRect tweenRect;
|
|
|
|
+
|
|
|
|
+ if (TweenRectDic.TryGetValue(target, out tweenRect))
|
|
|
|
+ {
|
|
|
|
+ return tweenRect;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ throw new Exception();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
public static TweenScale GetTweenScale(Transform target)
|
|
public static TweenScale GetTweenScale(Transform target)
|
|
{
|
|
{
|
|
TweenScale tweenScale;
|
|
TweenScale tweenScale;
|
|
@@ -566,6 +610,54 @@ public class ManaAnim : MonoBehaviour
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public static TweenRect CreateTweenRect(Transform target, Vector2 origin, Vector2 destination, float duration, bool originActive, bool destActive, Curve curve)
|
|
|
|
+ {
|
|
|
|
+ if (TweenRectDic.ContainsKey(target))
|
|
|
|
+ {
|
|
|
|
+ RectTransform rectTra = target.GetComponent<RectTransform>();
|
|
|
|
+
|
|
|
|
+ TweenRect tween = TweenRectDic[target];
|
|
|
|
+
|
|
|
|
+ tween = new TweenRect(rectTra, origin, destination, duration, originActive, destActive, curve);
|
|
|
|
+
|
|
|
|
+ return tween;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ RectTransform rectTra = target.GetComponent<RectTransform>();
|
|
|
|
+
|
|
|
|
+ TweenRect tween = new TweenRect(rectTra, origin, destination, duration, originActive, destActive, curve);
|
|
|
|
+
|
|
|
|
+ TweenRectDic.Add(target, tween);
|
|
|
|
+
|
|
|
|
+ return tween;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static TweenRect CreateTweenRect(Transform target, Vector2 destination, float duration, bool originActive, bool destActive, Curve curve)
|
|
|
|
+ {
|
|
|
|
+ if (TweenRectDic.ContainsKey(target))
|
|
|
|
+ {
|
|
|
|
+ RectTransform rectTra = target.GetComponent<RectTransform>();
|
|
|
|
+
|
|
|
|
+ TweenRect tween = TweenRectDic[target];
|
|
|
|
+
|
|
|
|
+ tween = new TweenRect(rectTra, rectTra.rect.size, destination, duration, originActive, destActive, curve);
|
|
|
|
+
|
|
|
|
+ return tween;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ RectTransform rectTra = target.GetComponent<RectTransform>();
|
|
|
|
+
|
|
|
|
+ TweenRect tween = new TweenRect(rectTra, rectTra.rect.size, destination, duration, originActive, destActive, curve);
|
|
|
|
+
|
|
|
|
+ TweenRectDic.Add(target, tween);
|
|
|
|
+
|
|
|
|
+ return tween;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
public static TweenScale CreateTweenScale(Transform target, Vector3 origin, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
|
|
public static TweenScale CreateTweenScale(Transform target, Vector3 origin, Vector3 destination, float duration, bool originActive, bool destActive, Curve curve)
|
|
{
|
|
{
|
|
if (TweenScaleDic.ContainsKey(target))
|
|
if (TweenScaleDic.ContainsKey(target))
|