void OnEnable() { if (luaObject != null) { LuaController.RegisterEventListener(luaObject); } }
void OnEnable() { if (scriptIsReady && luaObject != null) { if (l_OnEnable != null) { l_OnEnable(luaObject); } is_OnDisable = false; LuaController.RegisterEventListener(luaObject); } }
public void LuaRegisterEventAndCallAfterStart() { is_OnDisable = false; LuaController.RegisterEventListener(luaObject); scriptIsReady = true; foreach (CallInfo info in _callAfterStart) { Call(info.eventName, info.param); } _callAfterStart.Clear(); }
void luaAwake() { if (l_Awake != null) { if (args != null) { l_Awake(luaObject, args); } else { l_Awake(luaObject); } } LuaController.RegisterEventListener(luaObject); }