static int _m_GetPathCorners(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Logic.Battle __cl_gen_to_be_invoked = (Logic.Battle)translator.FastGetCSObj(L, 1); { Core.Math.Vec3 src; translator.Get(L, 2, out src); Core.Math.Vec3 dest; translator.Get(L, 3, out dest); Core.Math.Vec3[] __cl_gen_ret = __cl_gen_to_be_invoked.GetPathCorners(src, dest); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_HandleUseSkill(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Logic.Battle __cl_gen_to_be_invoked = (Logic.Battle)translator.FastGetCSObj(L, 1); { string sid = LuaAPI.lua_tostring(L, 2); string srcId = LuaAPI.lua_tostring(L, 3); string targetId = LuaAPI.lua_tostring(L, 4); Core.Math.Vec3 targetPoint; translator.Get(L, 5, out targetPoint); __cl_gen_to_be_invoked.HandleUseSkill(sid, srcId, targetId, targetPoint); return(0); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_NavMeshRaycast(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Logic.Battle __cl_gen_to_be_invoked = (Logic.Battle)translator.FastGetCSObj(L, 1); { Core.Math.Vec3 src; translator.Get(L, 2, out src); Core.Math.Vec3 dest; translator.Get(L, 3, out dest); Core.Math.Vec3 hitPosition; Core.Math.Vec3 hitNormal; bool __cl_gen_ret = __cl_gen_to_be_invoked.NavMeshRaycast(src, dest, out hitPosition, out hitNormal); LuaAPI.lua_pushboolean(L, __cl_gen_ret); translator.PushCoreMathVec3(L, hitPosition); translator.PushCoreMathVec3(L, hitNormal); return(3); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_CreateBuff(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Logic.Battle __cl_gen_to_be_invoked = (Logic.Battle)translator.FastGetCSObj(L, 1); { string buffId = LuaAPI.lua_tostring(L, 2); string skillId = LuaAPI.lua_tostring(L, 3); int lvl = LuaAPI.xlua_tointeger(L, 4); Logic.Controller.Bio caster = (Logic.Controller.Bio)translator.GetObject(L, 5, typeof(Logic.Controller.Bio)); Logic.Controller.Bio target = (Logic.Controller.Bio)translator.GetObject(L, 6, typeof(Logic.Controller.Bio)); Core.Math.Vec3 targetPoint; translator.Get(L, 7, out targetPoint); Logic.Controller.Buff __cl_gen_ret = __cl_gen_to_be_invoked.CreateBuff(buffId, skillId, lvl, caster, target, targetPoint); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_CreateMissile(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Logic.Battle __cl_gen_to_be_invoked = (Logic.Battle)translator.FastGetCSObj(L, 1); { string id = LuaAPI.lua_tostring(L, 2); Core.Math.Vec3 position; translator.Get(L, 3, out position); Core.Math.Vec3 direction; translator.Get(L, 4, out direction); Logic.Controller.Missile __cl_gen_ret = __cl_gen_to_be_invoked.CreateMissile(id, position, direction); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_RandomPoint(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Logic.Battle __cl_gen_to_be_invoked = (Logic.Battle)translator.FastGetCSObj(L, 1); { Core.Math.Vec3 center; translator.Get(L, 2, out center); float range = (float)LuaAPI.lua_tonumber(L, 3); Core.Math.Vec3 __cl_gen_ret = __cl_gen_to_be_invoked.RandomPoint(center, range); translator.PushCoreMathVec3(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
public IBattleDisplay GetBattleDisplay(Logic.Battle battle) { if (mBattleObj == null) { mBattleObj = new GameObject("Battle"); mBattleObj.transform.localPosition = new Vector3(0, -5, 0); } var battle_display = mBattleObj.AddComponent <BattleDisplay>(); return(battle_display); }
static int _g_get_luaEnv(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Logic.Battle __cl_gen_to_be_invoked = (Logic.Battle)translator.FastGetCSObj(L, 1); translator.Push(L, __cl_gen_to_be_invoked.luaEnv); } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(1); }
static int _m_Dispose(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Logic.Battle __cl_gen_to_be_invoked = (Logic.Battle)translator.FastGetCSObj(L, 1); { __cl_gen_to_be_invoked.Dispose( ); return(0); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 4 && translator.Assignable <Logic.BattleParams>(L, 2) && translator.Assignable <org.critterai.nav.Navmesh>(L, 3) && translator.Assignable <XLua.LuaEnv>(L, 4)) { Logic.BattleParams param; translator.Get(L, 2, out param); org.critterai.nav.Navmesh navmesh = (org.critterai.nav.Navmesh)translator.GetObject(L, 3, typeof(org.critterai.nav.Navmesh)); XLua.LuaEnv luaEnv = (XLua.LuaEnv)translator.GetObject(L, 4, typeof(XLua.LuaEnv)); Logic.Battle __cl_gen_ret = new Logic.Battle(param, navmesh, luaEnv); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to Logic.Battle constructor!")); }
static int _m_GetBuff(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Logic.Battle __cl_gen_to_be_invoked = (Logic.Battle)translator.FastGetCSObj(L, 1); int __gen_param_count = LuaAPI.lua_gettop(L); if (__gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { string rid = LuaAPI.lua_tostring(L, 2); Logic.Controller.Buff __cl_gen_ret = __cl_gen_to_be_invoked.GetBuff(rid); translator.Push(L, __cl_gen_ret); return(1); } if (__gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING)) { string ownerId = LuaAPI.lua_tostring(L, 2); string buffId = LuaAPI.lua_tostring(L, 3); Logic.Controller.Buff __cl_gen_ret = __cl_gen_to_be_invoked.GetBuff(ownerId, buffId); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to Logic.Battle.GetBuff!")); }
static int _m_HandleRelive(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Logic.Battle __cl_gen_to_be_invoked = (Logic.Battle)translator.FastGetCSObj(L, 1); { string rid = LuaAPI.lua_tostring(L, 2); __cl_gen_to_be_invoked.HandleRelive(rid); return(0); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_Simulate(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Logic.Battle __cl_gen_to_be_invoked = (Logic.Battle)translator.FastGetCSObj(L, 1); { float realDeltaTime = (float)LuaAPI.lua_tonumber(L, 2); float deltaTime = (float)LuaAPI.lua_tonumber(L, 3); __cl_gen_to_be_invoked.Simulate(realDeltaTime, deltaTime); return(0); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_SampleNavPosition(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Logic.Battle __cl_gen_to_be_invoked = (Logic.Battle)translator.FastGetCSObj(L, 1); { Core.Math.Vec3 searchPoint; translator.Get(L, 2, out searchPoint); Core.Math.Vec3 __cl_gen_ret = __cl_gen_to_be_invoked.SampleNavPosition(searchPoint); translator.PushCoreMathVec3(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }
static int _m_GetMissile(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Logic.Battle __cl_gen_to_be_invoked = (Logic.Battle)translator.FastGetCSObj(L, 1); { string rid = LuaAPI.lua_tostring(L, 2); Logic.Controller.Missile __cl_gen_ret = __cl_gen_to_be_invoked.GetMissile(rid); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }