663 lines
22 KiB
C#
663 lines
22 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 LuaUIBehaviourWrap
|
|||
|
{
|
|||
|
public static void __Register(RealStatePtr L)
|
|||
|
{
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
System.Type type = typeof(LuaUIBehaviour);
|
|||
|
Utils.BeginObjectRegister(type, L, translator, 0, 7, 2, 2);
|
|||
|
|
|||
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Awake", _m_Awake);
|
|||
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnRevPacket", _m_OnRevPacket);
|
|||
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CloseUI", _m_CloseUI);
|
|||
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetChildUILua", _m_GetChildUILua);
|
|||
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CallScriptFunc", _m_CallScriptFunc);
|
|||
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CallScriptFuncAtPath", _m_CallScriptFuncAtPath);
|
|||
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetInjectionObj", _m_GetInjectionObj);
|
|||
|
|
|||
|
|
|||
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "luaScript", _g_get_luaScript);
|
|||
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "injectionGos", _g_get_injectionGos);
|
|||
|
|
|||
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "luaScript", _s_set_luaScript);
|
|||
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "injectionGos", _s_set_injectionGos);
|
|||
|
|
|||
|
|
|||
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|||
|
null, null, null);
|
|||
|
|
|||
|
Utils.BeginClassRegister(type, L, __CreateInstance, 12, 0, 0);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "InstantiateSubItem", _m_InstantiateSubItem_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "ClearAllChildItem", _m_ClearAllChildItem_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetCommonItem", _m_GetCommonItem_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetStrDictionary", _m_GetStrDictionary_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetChildImage", _m_GetChildImage_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "SetImage", _m_SetImage_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "SetItemIcon", _m_SetItemIcon_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetChildText", _m_GetChildText_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "SetText", _m_SetText_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetPlayerInfo", _m_GetPlayerInfo_xlua_st_);
|
|||
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "SetCommonAward", _m_SetCommonAward_xlua_st_);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
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 LuaUIBehaviour();
|
|||
|
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 LuaUIBehaviour constructor!");
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_Awake(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
LuaUIBehaviour gen_to_be_invoked = (LuaUIBehaviour)translator.FastGetCSObj(L, 1);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
|
|||
|
gen_to_be_invoked.Awake( );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_OnRevPacket(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
LuaUIBehaviour gen_to_be_invoked = (LuaUIBehaviour)translator.FastGetCSObj(L, 1);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
PacketDistributed _packet = (PacketDistributed)translator.GetObject(L, 2, typeof(PacketDistributed));
|
|||
|
|
|||
|
gen_to_be_invoked.OnRevPacket( _packet );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_CloseUI(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
LuaUIBehaviour gen_to_be_invoked = (LuaUIBehaviour)translator.FastGetCSObj(L, 1);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
|
|||
|
gen_to_be_invoked.CloseUI( );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_InstantiateSubItem_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _subItemPre = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
UnityEngine.GameObject _parent = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|||
|
|
|||
|
var gen_ret = LuaUIBehaviour.InstantiateSubItem( _subItemPre, _parent );
|
|||
|
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_ClearAllChildItem_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _parent = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
|
|||
|
LuaUIBehaviour.ClearAllChildItem( _parent );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_GetCommonItem_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
int _itemData = LuaAPI.xlua_tointeger(L, 1);
|
|||
|
|
|||
|
var gen_ret = LuaUIBehaviour.GetCommonItem( _itemData );
|
|||
|
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_GetStrDictionary_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
int _strDictionary = LuaAPI.xlua_tointeger(L, 1);
|
|||
|
|
|||
|
var gen_ret = LuaUIBehaviour.GetStrDictionary( _strDictionary );
|
|||
|
LuaAPI.lua_pushstring(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_GetChildImage_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
string _childName = LuaAPI.lua_tostring(L, 2);
|
|||
|
|
|||
|
var gen_ret = LuaUIBehaviour.GetChildImage( _go, _childName );
|
|||
|
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_SetImage_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
string _childName = LuaAPI.lua_tostring(L, 2);
|
|||
|
string _imageName = LuaAPI.lua_tostring(L, 3);
|
|||
|
|
|||
|
LuaUIBehaviour.SetImage( _go, _childName, _imageName );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_SetItemIcon_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
string _childName = LuaAPI.lua_tostring(L, 2);
|
|||
|
int _itemData = LuaAPI.xlua_tointeger(L, 3);
|
|||
|
|
|||
|
LuaUIBehaviour.SetItemIcon( _go, _childName, _itemData );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_GetChildText_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
string _childName = LuaAPI.lua_tostring(L, 2);
|
|||
|
|
|||
|
var gen_ret = LuaUIBehaviour.GetChildText( _go, _childName );
|
|||
|
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_SetText_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
string _childName = LuaAPI.lua_tostring(L, 2);
|
|||
|
string _textStr = LuaAPI.lua_tostring(L, 3);
|
|||
|
|
|||
|
LuaUIBehaviour.SetText( _go, _childName, _textStr );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_GetPlayerInfo_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
|
|||
|
var gen_ret = LuaUIBehaviour.GetPlayerInfo( );
|
|||
|
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_GetChildUILua(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
LuaUIBehaviour gen_to_be_invoked = (LuaUIBehaviour)translator.FastGetCSObj(L, 1);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
string _childName = LuaAPI.lua_tostring(L, 2);
|
|||
|
|
|||
|
var gen_ret = gen_to_be_invoked.GetChildUILua( _childName );
|
|||
|
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_SetCommonAward_xlua_st_(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
UnityEngine.GameObject _itemGO = (UnityEngine.GameObject)translator.GetObject(L, 1, typeof(UnityEngine.GameObject));
|
|||
|
int _awardType = LuaAPI.xlua_tointeger(L, 2);
|
|||
|
int _subType = LuaAPI.xlua_tointeger(L, 3);
|
|||
|
int _num = LuaAPI.xlua_tointeger(L, 4);
|
|||
|
|
|||
|
LuaUIBehaviour.SetCommonAward( _itemGO, _awardType, _subType, _num );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_CallScriptFunc(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
LuaUIBehaviour gen_to_be_invoked = (LuaUIBehaviour)translator.FastGetCSObj(L, 1);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
string _funcName = LuaAPI.lua_tostring(L, 2);
|
|||
|
|
|||
|
gen_to_be_invoked.CallScriptFunc( _funcName );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_CallScriptFuncAtPath(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
LuaUIBehaviour gen_to_be_invoked = (LuaUIBehaviour)translator.FastGetCSObj(L, 1);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
string _funcName = LuaAPI.lua_tostring(L, 2);
|
|||
|
object[] _funcParam = translator.GetParams<object>(L, 3);
|
|||
|
|
|||
|
gen_to_be_invoked.CallScriptFuncAtPath( _funcName, _funcParam );
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _m_GetInjectionObj(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
|
|||
|
LuaUIBehaviour gen_to_be_invoked = (LuaUIBehaviour)translator.FastGetCSObj(L, 1);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
{
|
|||
|
string _name = LuaAPI.lua_tostring(L, 2);
|
|||
|
|
|||
|
var gen_ret = gen_to_be_invoked.GetInjectionObj( _name );
|
|||
|
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 _g_get_luaScript(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
LuaUIBehaviour gen_to_be_invoked = (LuaUIBehaviour)translator.FastGetCSObj(L, 1);
|
|||
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.luaScript);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _g_get_injectionGos(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
LuaUIBehaviour gen_to_be_invoked = (LuaUIBehaviour)translator.FastGetCSObj(L, 1);
|
|||
|
translator.Push(L, gen_to_be_invoked.injectionGos);
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 1;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|||
|
static int _s_set_luaScript(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
LuaUIBehaviour gen_to_be_invoked = (LuaUIBehaviour)translator.FastGetCSObj(L, 1);
|
|||
|
gen_to_be_invoked.luaScript = LuaAPI.lua_tostring(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_injectionGos(RealStatePtr L)
|
|||
|
{
|
|||
|
try {
|
|||
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|||
|
|
|||
|
LuaUIBehaviour gen_to_be_invoked = (LuaUIBehaviour)translator.FastGetCSObj(L, 1);
|
|||
|
gen_to_be_invoked.injectionGos = (LuaParamGO[])translator.GetObject(L, 2, typeof(LuaParamGO[]));
|
|||
|
|
|||
|
} catch(System.Exception gen_e) {
|
|||
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|