264 lines
8.9 KiB
C#
264 lines
8.9 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 BFBattleControlWarningColliderWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(BF.BattleControlWarningCollider);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 3, 3, 3);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitWarningType", _m_InitWarningType);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetColliderEnable", _m_SetColliderEnable);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetColliderDisable", _m_SetColliderDisable);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "parentWarning", _g_get_parentWarning);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "boxCollider", _g_get_boxCollider);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "sphereCollider", _g_get_sphereCollider);
|
|
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "parentWarning", _s_set_parentWarning);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "boxCollider", _s_set_boxCollider);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "sphereCollider", _s_set_sphereCollider);
|
|
|
|
|
|
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.BattleControlWarningCollider();
|
|
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.BattleControlWarningCollider constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_InitWarningType(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
BF.BattleControlWarning _parentWarning = (BF.BattleControlWarning)translator.GetObject(L, 2, typeof(BF.BattleControlWarning));
|
|
int _warningType = LuaAPI.xlua_tointeger(L, 3);
|
|
|
|
gen_to_be_invoked.InitWarningType( _parentWarning, _warningType );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetColliderEnable(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.SetColliderEnable( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetColliderDisable(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.SetColliderDisable( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_parentWarning(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.parentWarning);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_boxCollider(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.boxCollider);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_sphereCollider(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.sphereCollider);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_parentWarning(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.parentWarning = (BF.BattleControlWarning)translator.GetObject(L, 2, typeof(BF.BattleControlWarning));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_boxCollider(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.boxCollider = (UnityEngine.BoxCollider)translator.GetObject(L, 2, typeof(UnityEngine.BoxCollider));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_sphereCollider(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlWarningCollider gen_to_be_invoked = (BF.BattleControlWarningCollider)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.sphereCollider = (UnityEngine.SphereCollider)translator.GetObject(L, 2, typeof(UnityEngine.SphereCollider));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|