490 lines
18 KiB
C#
490 lines
18 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 BFBattleControlWarningWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(BF.BattleControlWarning);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 10, 3, 3);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetUniqueId", _m_GetUniqueId);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetIsEnable", _m_GetIsEnable);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetIsRecycle", _m_GetIsRecycle);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitOwnerAndTarget", _m_InitOwnerAndTarget);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitCircleWarning", _m_InitCircleWarning);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitRectWarning", _m_InitRectWarning);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitFollowColliderWarning", _m_InitFollowColliderWarning);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Recycle", _m_Recycle);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddLuaOnBattleEvent", _m_AddLuaOnBattleEvent);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBattleEvent", _m_OnBattleEvent);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "outSp", _g_get_outSp);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "inSp", _g_get_inSp);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "controlCollider", _g_get_controlCollider);
|
|
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "outSp", _s_set_outSp);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "inSp", _s_set_inSp);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "controlCollider", _s_set_controlCollider);
|
|
|
|
|
|
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.BattleControlWarning();
|
|
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.BattleControlWarning constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetUniqueId(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetUniqueId( );
|
|
LuaAPI.xlua_pushinteger(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_GetIsEnable(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetIsEnable( );
|
|
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_GetIsRecycle(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetIsRecycle( );
|
|
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_InitOwnerAndTarget(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
BF.BattleControlUnit _owner = (BF.BattleControlUnit)translator.GetObject(L, 2, typeof(BF.BattleControlUnit));
|
|
BF.BattleControlUnit _target = (BF.BattleControlUnit)translator.GetObject(L, 3, typeof(BF.BattleControlUnit));
|
|
int _uniqueId = LuaAPI.xlua_tointeger(L, 4);
|
|
|
|
gen_to_be_invoked.InitOwnerAndTarget( _owner, _target, _uniqueId );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_InitCircleWarning(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _warningType = LuaAPI.xlua_tointeger(L, 2);
|
|
float _deflectionX = (float)LuaAPI.lua_tonumber(L, 3);
|
|
float _deflectionZ = (float)LuaAPI.lua_tonumber(L, 4);
|
|
float _warningRadius = (float)LuaAPI.lua_tonumber(L, 5);
|
|
float _warningDelayTime = (float)LuaAPI.lua_tonumber(L, 6);
|
|
float _warningDuration = (float)LuaAPI.lua_tonumber(L, 7);
|
|
int _warningTargetType = LuaAPI.xlua_tointeger(L, 8);
|
|
|
|
gen_to_be_invoked.InitCircleWarning( _warningType, _deflectionX, _deflectionZ, _warningRadius, _warningDelayTime, _warningDuration, _warningTargetType );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_InitRectWarning(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _warningType = LuaAPI.xlua_tointeger(L, 2);
|
|
float _startDeflectionX = (float)LuaAPI.lua_tonumber(L, 3);
|
|
float _startDeflectionZ = (float)LuaAPI.lua_tonumber(L, 4);
|
|
float _endDeflectionX = (float)LuaAPI.lua_tonumber(L, 5);
|
|
float _endDeflectionZ = (float)LuaAPI.lua_tonumber(L, 6);
|
|
float _warningRectX = (float)LuaAPI.lua_tonumber(L, 7);
|
|
float _warningRectY = (float)LuaAPI.lua_tonumber(L, 8);
|
|
float _warningDelayTime = (float)LuaAPI.lua_tonumber(L, 9);
|
|
float _warningDuration = (float)LuaAPI.lua_tonumber(L, 10);
|
|
int _warningTargetType = LuaAPI.xlua_tointeger(L, 11);
|
|
|
|
gen_to_be_invoked.InitRectWarning( _warningType, _startDeflectionX, _startDeflectionZ, _endDeflectionX, _endDeflectionZ, _warningRectX, _warningRectY, _warningDelayTime, _warningDuration, _warningTargetType );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_InitFollowColliderWarning(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _warningType = LuaAPI.xlua_tointeger(L, 2);
|
|
float _deflectionX = (float)LuaAPI.lua_tonumber(L, 3);
|
|
float _deflectionZ = (float)LuaAPI.lua_tonumber(L, 4);
|
|
float _warningRadius = (float)LuaAPI.lua_tonumber(L, 5);
|
|
float _warningDelayTime = (float)LuaAPI.lua_tonumber(L, 6);
|
|
float _warningDuration = (float)LuaAPI.lua_tonumber(L, 7);
|
|
BF.BattleControlCollider _collider = (BF.BattleControlCollider)translator.GetObject(L, 8, typeof(BF.BattleControlCollider));
|
|
|
|
gen_to_be_invoked.InitFollowColliderWarning( _warningType, _deflectionX, _deflectionZ, _warningRadius, _warningDelayTime, _warningDuration, _collider );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Recycle(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.Recycle( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddLuaOnBattleEvent(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
System.Action<int> _luaFunc = translator.GetDelegate<System.Action<int>>(L, 2);
|
|
|
|
gen_to_be_invoked.AddLuaOnBattleEvent( _luaFunc );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_OnBattleEvent(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _eventType = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
gen_to_be_invoked.OnBattleEvent( _eventType );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_outSp(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.outSp);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_inSp(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.inSp);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_controlCollider(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.controlCollider);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_outSp(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.outSp = (UnityEngine.SpriteRenderer)translator.GetObject(L, 2, typeof(UnityEngine.SpriteRenderer));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_inSp(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.inSp = (UnityEngine.SpriteRenderer)translator.GetObject(L, 2, typeof(UnityEngine.SpriteRenderer));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_controlCollider(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BattleControlWarning gen_to_be_invoked = (BF.BattleControlWarning)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.controlCollider = (BF.BattleControlWarningCollider)translator.GetObject(L, 2, typeof(BF.BattleControlWarningCollider));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|