#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 EffectMgrWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(EffectMgr);
|
Utils.BeginObjectRegister(type, L, translator, 0, 3, 0, 0);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetUIEffect", _m_GetUIEffect);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PlayUIEffect", _m_PlayUIEffect);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RecyleUIEffect", _m_RecyleUIEffect);
|
|
|
|
|
|
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)
|
{
|
|
EffectMgr gen_ret = new EffectMgr();
|
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 EffectMgr constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetUIEffect(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
EffectMgr gen_to_be_invoked = (EffectMgr)translator.FastGetCSObj(L, 1);
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
|
{
|
int _id = LuaAPI.xlua_tointeger(L, 2);
|
bool __destroy = LuaAPI.lua_toboolean(L, 3);
|
|
Snxxz.UI.UIEffectBehaviour gen_ret = gen_to_be_invoked.GetUIEffect( _id, __destroy );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
|
{
|
int _id = LuaAPI.xlua_tointeger(L, 2);
|
|
Snxxz.UI.UIEffectBehaviour gen_ret = gen_to_be_invoked.GetUIEffect( _id );
|
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 EffectMgr.GetUIEffect!");
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_PlayUIEffect(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
EffectMgr gen_to_be_invoked = (EffectMgr)translator.FastGetCSObj(L, 1);
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
if(gen_param_count == 5&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& translator.Assignable<UnityEngine.Transform>(L, 4)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 5))
|
{
|
int _id = LuaAPI.xlua_tointeger(L, 2);
|
int _renderQueue = LuaAPI.xlua_tointeger(L, 3);
|
UnityEngine.Transform _parent = (UnityEngine.Transform)translator.GetObject(L, 4, typeof(UnityEngine.Transform));
|
bool _loop = LuaAPI.lua_toboolean(L, 5);
|
|
UIEffect gen_ret = gen_to_be_invoked.PlayUIEffect( _id, _renderQueue, _parent, _loop );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
if(gen_param_count == 5&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& translator.Assignable<UnityEngine.Vector3>(L, 4)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 5))
|
{
|
int _id = LuaAPI.xlua_tointeger(L, 2);
|
int _renderQueue = LuaAPI.xlua_tointeger(L, 3);
|
UnityEngine.Vector3 __localPos;translator.Get(L, 4, out __localPos);
|
bool _loop = LuaAPI.lua_toboolean(L, 5);
|
|
UIEffect gen_ret = gen_to_be_invoked.PlayUIEffect( _id, _renderQueue, __localPos, _loop );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
if(gen_param_count == 4&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& translator.Assignable<UnityEngine.Vector3>(L, 4))
|
{
|
int _id = LuaAPI.xlua_tointeger(L, 2);
|
int _renderQueue = LuaAPI.xlua_tointeger(L, 3);
|
UnityEngine.Vector3 __localPos;translator.Get(L, 4, out __localPos);
|
|
UIEffect gen_ret = gen_to_be_invoked.PlayUIEffect( _id, _renderQueue, __localPos );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
if(gen_param_count == 6&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& translator.Assignable<UnityEngine.Transform>(L, 4)&& translator.Assignable<UnityEngine.Vector3>(L, 5)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 6))
|
{
|
int _id = LuaAPI.xlua_tointeger(L, 2);
|
int _renderQueue = LuaAPI.xlua_tointeger(L, 3);
|
UnityEngine.Transform _parent = (UnityEngine.Transform)translator.GetObject(L, 4, typeof(UnityEngine.Transform));
|
UnityEngine.Vector3 __localPos;translator.Get(L, 5, out __localPos);
|
bool _loop = LuaAPI.lua_toboolean(L, 6);
|
|
UIEffect gen_ret = gen_to_be_invoked.PlayUIEffect( _id, _renderQueue, _parent, __localPos, _loop );
|
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 EffectMgr.PlayUIEffect!");
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_RecyleUIEffect(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
EffectMgr gen_to_be_invoked = (EffectMgr)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int _id = LuaAPI.xlua_tointeger(L, 2);
|
UnityEngine.GameObject __effectObj = (UnityEngine.GameObject)translator.GetObject(L, 3, typeof(UnityEngine.GameObject));
|
|
gen_to_be_invoked.RecyleUIEffect( _id, __effectObj );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
}
|
}
|