1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- using System.Collections.Generic;
- using UnityEngine;
- namespace Core.UI.UTool.UITween
- {
-
- public class TweenTextMeshProUGUI: TweenBasic
- {
- public enum TweenTextMeshProUGUIType
- {
- Al,
- }
- public class TweenTextMeshProUGUIInfo
- {
- public TweenRectTransformType TweenRectTransformType;
- public TweenLerpType TweenLerpType;
- public Vector3 Start;
- public Vector3 End;
- public AnimationCurve startX=new AnimationCurve();
- public AnimationCurve startY=new AnimationCurve();
- public AnimationCurve startZ=new AnimationCurve();
- }
- // public RectTransform RectTransform;
- public List<TweenRectTransformInfo> TweenRectTransformInfos = new List<TweenRectTransformInfo>();
- public RectTransform GetRectTransform(Object RectTransform)
- {
-
- RectTransform rectTransform = RectTransform as RectTransform;
- if (rectTransform == null)
- {
- GameObject gameObject = RectTransform as GameObject;
- if (gameObject != null)
- {
- rectTransform = gameObject.GetComponent<RectTransform>();
- }
- }
- return rectTransform;
- }
- protected override void ProPlay(Object RectTransform, float allTime)
- {
- RectTransform rectTransform = GetRectTransform(RectTransform);
- if (rectTransform == null)
- {
- return;
- }
- float t = _addTime * allTime;
- if (t > 1)
- {
- t = 1;
- }
- for (int i = 0; i < TweenRectTransformInfos.Count; i++)
- {
- TweenRectTransformInfos[i].Play(rectTransform, t);
- }
- }
- protected override void ProRest(Object RectTransform)
- {
- RectTransform rectTransform = GetRectTransform(RectTransform);
- if (rectTransform == null)
- {
- return;
- }
- for (int i = 0; i < TweenRectTransformInfos.Count; i++)
- {
- TweenRectTransformInfos[i].Rest(rectTransform);
- }
- }
- }
- }
|