1430 lines
51 KiB
C#
1430 lines
51 KiB
C#
#if USE_UNI_LUA
|
|
using LuaAPI = UniLua.Lua;
|
|
using RealStatePtr = UniLua.ILuaState;
|
|
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
|
#else
|
|
using LuaAPI = XLua.LuaDLL.Lua;
|
|
using RealStatePtr = System.IntPtr;
|
|
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
|
#endif
|
|
|
|
using XLua;
|
|
using System.Collections.Generic;
|
|
|
|
|
|
namespace XLua.CSObjectWrap
|
|
{
|
|
using Utils = XLua.Utils;
|
|
public class BFBattleControlUnitWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(BF.BattleControlUnit);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 31, 13, 13);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnDead", _m_OnDead);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Clear", _m_Clear);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Reborn", _m_Reborn);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Revive", _m_Revive);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "MoveWithSkillAI", _m_MoveWithSkillAI);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PlayAirborne", _m_PlayAirborne);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "StopAirborne", _m_StopAirborne);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "TowardToTarget", _m_TowardToTarget);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ForceTowardToTarget", _m_ForceTowardToTarget);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetWhetherUseGroundSkill", _m_GetWhetherUseGroundSkill);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "BeHitBack", _m_BeHitBack);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "EnterDisappear", _m_EnterDisappear);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ExitDisappear", _m_ExitDisappear);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshHpBar", _m_RefreshHpBar);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitHpBar", _m_InitHpBar);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshShieldBar", _m_RefreshShieldBar);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CachePosition", _m_CachePosition);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CacheLocalEulerAnglesY", _m_CacheLocalEulerAnglesY);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitCircleBody", _m_InitCircleBody);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetDisappear", _m_SetDisappear);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSkillBoxCollider", _m_GetSkillBoxCollider);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSkillSphereCollider", _m_GetSkillSphereCollider);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSkillCollider", _m_GetSkillCollider);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "UseSkillColliders", _m_UseSkillColliders);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnHitTarget", _m_OnHitTarget);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddLuaOnHitTargetFunc", _m_AddLuaOnHitTargetFunc);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnFinishAIMove", _m_OnFinishAIMove);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddLuaOnFinishAIMoveFunc", _m_AddLuaOnFinishAIMoveFunc);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SendBoxBullet", _m_SendBoxBullet);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SendSphereBullet", _m_SendSphereBullet);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitShadow", _m_InitShadow);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "UnitType", _g_get_UnitType);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "CacheX", _g_get_CacheX);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "CacheY", _g_get_CacheY);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "CacheZ", _g_get_CacheZ);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Direction", _g_get_Direction);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "BodyRadius", _g_get_BodyRadius);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsDead", _g_get_IsDead);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "BattleMgr", _g_get_BattleMgr);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ReuseFlag", _g_get_ReuseFlag);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsInGroundState", _g_get_IsInGroundState);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Target", _g_get_Target);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsDisappear", _g_get_IsDisappear);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "HpBarAddY", _g_get_HpBarAddY);
|
|
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "UnitType", _s_set_UnitType);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "CacheX", _s_set_CacheX);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "CacheY", _s_set_CacheY);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "CacheZ", _s_set_CacheZ);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "Direction", _s_set_Direction);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "BodyRadius", _s_set_BodyRadius);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsDead", _s_set_IsDead);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "BattleMgr", _s_set_BattleMgr);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "ReuseFlag", _s_set_ReuseFlag);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsInGroundState", _s_set_IsInGroundState);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "Target", _s_set_Target);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsDisappear", _s_set_IsDisappear);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "HpBarAddY", _s_set_HpBarAddY);
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
null, null, null);
|
|
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Utils.EndClassRegister(type, L, translator);
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int __CreateInstance(RealStatePtr L)
|
|
{
|
|
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
if(LuaAPI.lua_gettop(L) == 1)
|
|
{
|
|
|
|
var gen_ret = new BF.BattleControlUnit();
|
|
translator.Push(L, 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 BF.BattleControlUnit constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_OnDead(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.OnDead( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Clear(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.Clear( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Reborn(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.Reborn( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Revive(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.Revive( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_MoveWithSkillAI(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _target = LuaAPI.xlua_tointeger(L, 2);
|
|
int _horizontal = LuaAPI.xlua_tointeger(L, 3);
|
|
float _x = (float)LuaAPI.lua_tonumber(L, 4);
|
|
float _z = (float)LuaAPI.lua_tonumber(L, 5);
|
|
int _refresh = LuaAPI.xlua_tointeger(L, 6);
|
|
int _across = LuaAPI.xlua_tointeger(L, 7);
|
|
float _speed = (float)LuaAPI.lua_tonumber(L, 8);
|
|
int _endType = LuaAPI.xlua_tointeger(L, 9);
|
|
float _endValue = (float)LuaAPI.lua_tonumber(L, 10);
|
|
int _collisionType = LuaAPI.xlua_tointeger(L, 11);
|
|
|
|
gen_to_be_invoked.MoveWithSkillAI( _target, _horizontal, _x, _z, _refresh, _across, _speed, _endType, _endValue, _collisionType );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_PlayAirborne(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.PlayAirborne( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_StopAirborne(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.StopAirborne( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_TowardToTarget(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.TowardToTarget( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_ForceTowardToTarget(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.ForceTowardToTarget( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetWhetherUseGroundSkill(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetWhetherUseGroundSkill( );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_BeHitBack(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.BeHitBack( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_EnterDisappear(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.EnterDisappear( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_ExitDisappear(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.ExitDisappear( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RefreshHpBar(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
float _percent = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
gen_to_be_invoked.RefreshHpBar( _percent );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_InitHpBar(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.InitHpBar( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RefreshShieldBar(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
float _percent = (float)LuaAPI.lua_tonumber(L, 2);
|
|
bool _visible = LuaAPI.lua_toboolean(L, 3);
|
|
|
|
gen_to_be_invoked.RefreshShieldBar( _percent, _visible );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_CachePosition(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.CachePosition( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_CacheLocalEulerAnglesY(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.CacheLocalEulerAnglesY( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_InitCircleBody(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
float _radius = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
gen_to_be_invoked.InitCircleBody( _radius );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetDisappear(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
bool _isDisappear = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
gen_to_be_invoked.SetDisappear( _isDisappear );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetSkillBoxCollider(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetSkillBoxCollider( );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetSkillSphereCollider(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetSkillSphereCollider( );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetSkillCollider(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _rangeType = LuaAPI.xlua_tointeger(L, 2);
|
|
float _collisionValue1 = (float)LuaAPI.lua_tonumber(L, 3);
|
|
float _collisionValue2 = (float)LuaAPI.lua_tonumber(L, 4);
|
|
float _x = (float)LuaAPI.lua_tonumber(L, 5);
|
|
float _z = (float)LuaAPI.lua_tonumber(L, 6);
|
|
|
|
var gen_ret = gen_to_be_invoked.GetSkillCollider( _rangeType, _collisionValue1, _collisionValue2, _x, _z );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_UseSkillColliders(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _aimSearchType = LuaAPI.xlua_tointeger(L, 2);
|
|
int _rangeType = LuaAPI.xlua_tointeger(L, 3);
|
|
float _interval = (float)LuaAPI.lua_tonumber(L, 4);
|
|
float _duration = (float)LuaAPI.lua_tonumber(L, 5);
|
|
int _skillId = LuaAPI.xlua_tointeger(L, 6);
|
|
int _cloneIndex = LuaAPI.xlua_tointeger(L, 7);
|
|
int _skillEffectIndex = LuaAPI.xlua_tointeger(L, 8);
|
|
bool _unlimitCount = LuaAPI.lua_toboolean(L, 9);
|
|
float _delayAimTime = (float)LuaAPI.lua_tonumber(L, 10);
|
|
float _aimFollowTime = (float)LuaAPI.lua_tonumber(L, 11);
|
|
float _aimFollowSpeed = (float)LuaAPI.lua_tonumber(L, 12);
|
|
float _collisionValue1 = (float)LuaAPI.lua_tonumber(L, 13);
|
|
float _collisionValue2 = (float)LuaAPI.lua_tonumber(L, 14);
|
|
float _x = (float)LuaAPI.lua_tonumber(L, 15);
|
|
float _z = (float)LuaAPI.lua_tonumber(L, 16);
|
|
bool _disposable = LuaAPI.lua_toboolean(L, 17);
|
|
|
|
var gen_ret = gen_to_be_invoked.UseSkillColliders( _aimSearchType, _rangeType, _interval, _duration, _skillId, _cloneIndex, _skillEffectIndex, _unlimitCount, _delayAimTime, _aimFollowTime, _aimFollowSpeed, _collisionValue1, _collisionValue2, _x, _z, _disposable );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_OnHitTarget(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
int _skillId = LuaAPI.xlua_tointeger(L, 3);
|
|
int _cloneIndex = LuaAPI.xlua_tointeger(L, 4);
|
|
int _skillEffectIndex = LuaAPI.xlua_tointeger(L, 5);
|
|
|
|
gen_to_be_invoked.OnHitTarget( _go, _skillId, _cloneIndex, _skillEffectIndex );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddLuaOnHitTargetFunc(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
System.Action<int, int, int, int> _luaFunc = translator.GetDelegate<System.Action<int, int, int, int>>(L, 2);
|
|
|
|
gen_to_be_invoked.AddLuaOnHitTargetFunc( _luaFunc );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_OnFinishAIMove(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.OnFinishAIMove( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddLuaOnFinishAIMoveFunc(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
System.Action _luaFunc = translator.GetDelegate<System.Action>(L, 2);
|
|
|
|
gen_to_be_invoked.AddLuaOnFinishAIMoveFunc( _luaFunc );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SendBoxBullet(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _skillId = LuaAPI.xlua_tointeger(L, 2);
|
|
int _cloneIndex = LuaAPI.xlua_tointeger(L, 3);
|
|
int _skillEffectIndex = LuaAPI.xlua_tointeger(L, 4);
|
|
int _bulletType = LuaAPI.xlua_tointeger(L, 5);
|
|
int _bulletFinishType = LuaAPI.xlua_tointeger(L, 6);
|
|
int _bulletOriginType = LuaAPI.xlua_tointeger(L, 7);
|
|
int _searchType = LuaAPI.xlua_tointeger(L, 8);
|
|
float _w = (float)LuaAPI.lua_tonumber(L, 9);
|
|
float _h = (float)LuaAPI.lua_tonumber(L, 10);
|
|
float _duration = (float)LuaAPI.lua_tonumber(L, 11);
|
|
float _speed = (float)LuaAPI.lua_tonumber(L, 12);
|
|
float _offsetX = (float)LuaAPI.lua_tonumber(L, 13);
|
|
float _offsetZ = (float)LuaAPI.lua_tonumber(L, 14);
|
|
|
|
var gen_ret = gen_to_be_invoked.SendBoxBullet( _skillId, _cloneIndex, _skillEffectIndex, _bulletType, _bulletFinishType, _bulletOriginType, _searchType, _w, _h, _duration, _speed, _offsetX, _offsetZ );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SendSphereBullet(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _skillId = LuaAPI.xlua_tointeger(L, 2);
|
|
int _cloneIndex = LuaAPI.xlua_tointeger(L, 3);
|
|
int _skillEffectIndex = LuaAPI.xlua_tointeger(L, 4);
|
|
int _bulletType = LuaAPI.xlua_tointeger(L, 5);
|
|
int _bulletFinishType = LuaAPI.xlua_tointeger(L, 6);
|
|
int _bulletOriginType = LuaAPI.xlua_tointeger(L, 7);
|
|
int _searchType = LuaAPI.xlua_tointeger(L, 8);
|
|
float _radius = (float)LuaAPI.lua_tonumber(L, 9);
|
|
float _duration = (float)LuaAPI.lua_tonumber(L, 10);
|
|
float _speed = (float)LuaAPI.lua_tonumber(L, 11);
|
|
float _offsetX = (float)LuaAPI.lua_tonumber(L, 12);
|
|
float _offsetZ = (float)LuaAPI.lua_tonumber(L, 13);
|
|
|
|
var gen_ret = gen_to_be_invoked.SendSphereBullet( _skillId, _cloneIndex, _skillEffectIndex, _bulletType, _bulletFinishType, _bulletOriginType, _searchType, _radius, _duration, _speed, _offsetX, _offsetZ );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_InitShadow(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.InitShadow( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_UnitType(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.UnitType);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_CacheX(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.CacheX);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_CacheY(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.CacheY);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_CacheZ(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.CacheZ);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Direction(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Direction);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_BodyRadius(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.BodyRadius);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_IsDead(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsDead);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_BattleMgr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.BattleMgr);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_ReuseFlag(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushint64(L, gen_to_be_invoked.ReuseFlag);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_IsInGroundState(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsInGroundState);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Target(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.Target);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_IsDisappear(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsDisappear);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_HpBarAddY(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.HpBarAddY);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_UnitType(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.UnitType = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_CacheX(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.CacheX = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_CacheY(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.CacheY = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_CacheZ(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.CacheZ = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_Direction(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.Direction = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_BodyRadius(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.BodyRadius = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_IsDead(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.IsDead = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_BattleMgr(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.BattleMgr = (BF.BattleManager)translator.GetObject(L, 2, typeof(BF.BattleManager));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_ReuseFlag(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.ReuseFlag = LuaAPI.lua_toint64(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_IsInGroundState(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.IsInGroundState = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_Target(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.Target = (BF.BattleControlUnit)translator.GetObject(L, 2, typeof(BF.BattleControlUnit));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_IsDisappear(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.IsDisappear = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_HpBarAddY(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlUnit gen_to_be_invoked = (BF.BattleControlUnit)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.HpBarAddY = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|