| 1234567891011121314151617181920212223242526272829303132333435363738 |
- using UnityEngine;
- using System.Collections;
- using UnityEngine.Events;
- namespace uTools
- {
- public class uTweenFinishEventLua : MonoBehaviour
- {
- string m_callBack = "";
- uTweener tweener;
- void Awake()
- {
- tweener = GetComponent<uTweener>();
- }
- public void SetOnFinishCallBack(string callBack)
- {
- m_callBack = callBack;
- tweener.AddOnFinishEvent(OnFinish);
- }
- void OnFinish()
- {
- if (!string.IsNullOrEmpty(m_callBack))
- {
- //G.LuaManager.CallLuaFunction(m_callBack);
- }
- }
- public void RemoveOnFinishCallBack()
- {
- m_callBack = string.Empty;
- tweener.RemoveFinishEvent(OnFinish);
- }
- }
- }
|