protected override void AddEventToLua(IntPtr L) { mMoveEvent = GetComponent<WEventMove>(); if (mMoveEvent == null) { throw new System.Exception("Could't not find WEventMove Component"); } LuaStatic.addGameObject2Lua(L, mMoveEvent, "WEventMove"); }
void OnDrawGizmos() { #if UNITY_EDITOR mMoveEvent = GetComponent<WEventMove>(); if (mMoveEvent == null) { mMoveEvent = gameObject.AddComponent<WEventMove>(); } #endif }
protected override void PushDataToLua(IntPtr L) { mMoveEvent = GetComponent<WEventMove>(); LuaDLL.lua_pushstring(L, id); LuaDLL.lua_setfield(L, -2, "id"); LuaDLL.lua_pushinteger(L, (int)mMoveEvent.mDriverType); LuaDLL.lua_setfield(L, -2, "driverType"); LuaDLL.lua_pushstring(L, targetid); LuaDLL.lua_setfield(L, -2, "targetid"); }