1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- using System;
- using OfficeOpenXml.FormulaParsing.Excel.Functions.Logical;
- using UnityEngine;
- using Object = UnityEngine.Object;
- namespace Core.UI.UTool.UITween
- {
- [System.Serializable]
- public abstract class TweenBasic : IDisposable
- {
- public bool Foldout;
- public float duration;
- public float delay;
- public float currSchedule;
- protected float _addTime;
- public void Play(Object RectTransform,float allTime,bool isFallBack)
- {
- if (allTime < delay)
- {
- if (isFallBack)
- {
- Rest(RectTransform);
- }
- return;
- }
- ProPlay(RectTransform,allTime - delay);
- }
- protected virtual void ProPlay(Object RectTransform,float allTime)
- {
- }
- public void Rest(Object RectTransform)
- {
- ProRest(RectTransform);
- }
- protected virtual void ProRest(Object RectTransform)
- {
- }
- public void Prepare(float delay,float duration)
- {
- this.delay = delay;
- this.duration = duration;
- _addTime = 1.0f / duration;
- }
- public void Dispose()
- {
- ProDispose();
- }
- protected void ProDispose()
- {
- }
- }
- }
|