12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace CommonUnity3D.UGUIAction
- {
- public class ActionBase : IAction
- {
- public delegate void ActionFinishHandler(IActionCompment sender);
- public ActionFinishHandler ActionFinishCallBack;
- protected bool mIsEnd = false;
- protected EaseType mEaseType = EaseType.linear;
- public EaseType ActionEaseType
- {
- get { return mEaseType; }
- set { mEaseType = value; }
- }
- public virtual void onUpdate(IActionCompment unit, float deltaTime)
- {
-
- }
- public virtual void onStart(IActionCompment unit)
- {
-
- }
- public virtual void onStop(IActionCompment unit, bool sendCallBack)
- {
- if (sendCallBack == true && ActionFinishCallBack != null) { ActionFinishCallBack(unit); }
- if (ActionFinishCallBack != null) { ActionFinishCallBack = null; }
- }
- public virtual bool IsEnd()
- {
- return mIsEnd;
- }
- public virtual string GetActionType()
- {
- throw new NotImplementedException();
- }
- }
- }
|