| New file |
| | |
| | | #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 HeroRoundGirdGirdNodeWrap |
| | | { |
| | | public static void __Register(RealStatePtr L) |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(HeroRoundGird.GirdNode); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 5, 5); |
| | | |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "index", _g_get_index); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "column", _g_get_column); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "row", _g_get_row); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "dis", _g_get_dis); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "ownerSID", _g_get_ownerSID); |
| | | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "index", _s_set_index); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "column", _s_set_column); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "row", _s_set_row); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "dis", _s_set_dis); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "ownerSID", _s_set_ownerSID); |
| | | |
| | | |
| | | 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) |
| | | { |
| | | |
| | | HeroRoundGird.GirdNode gen_ret = new HeroRoundGird.GirdNode(); |
| | | 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 HeroRoundGird.GirdNode constructor!"); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_index(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | HeroRoundGird.GirdNode gen_to_be_invoked = (HeroRoundGird.GirdNode)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.index); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_column(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | HeroRoundGird.GirdNode gen_to_be_invoked = (HeroRoundGird.GirdNode)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.column); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_row(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | HeroRoundGird.GirdNode gen_to_be_invoked = (HeroRoundGird.GirdNode)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.row); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_dis(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | HeroRoundGird.GirdNode gen_to_be_invoked = (HeroRoundGird.GirdNode)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushnumber(L, gen_to_be_invoked.dis); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_ownerSID(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | HeroRoundGird.GirdNode gen_to_be_invoked = (HeroRoundGird.GirdNode)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushuint(L, gen_to_be_invoked.ownerSID); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_index(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | HeroRoundGird.GirdNode gen_to_be_invoked = (HeroRoundGird.GirdNode)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.index = 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_column(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | HeroRoundGird.GirdNode gen_to_be_invoked = (HeroRoundGird.GirdNode)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.column = 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_row(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | HeroRoundGird.GirdNode gen_to_be_invoked = (HeroRoundGird.GirdNode)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.row = 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_dis(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | HeroRoundGird.GirdNode gen_to_be_invoked = (HeroRoundGird.GirdNode)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.dis = (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_ownerSID(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | HeroRoundGird.GirdNode gen_to_be_invoked = (HeroRoundGird.GirdNode)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.ownerSID = LuaAPI.xlua_touint(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e9b6f0f146a0e29468e1f2c5ce5fb270 |
| | | timeCreated: 1562567675 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | #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 HeroRoundGirdWrap |
| | | { |
| | | public static void __Register(RealStatePtr L) |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(HeroRoundGird); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 6, 0, 0); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetRealPos", _m_GetRealPos); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Get", _m_Get); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Request", _m_Request); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Release", _m_Release); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | 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) |
| | | { |
| | | |
| | | HeroRoundGird gen_ret = new HeroRoundGird(); |
| | | 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 HeroRoundGird constructor!"); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetRealPos(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | HeroRoundGird gen_to_be_invoked = (HeroRoundGird)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | HeroRoundGird.GirdNode _node = (HeroRoundGird.GirdNode)translator.GetObject(L, 2, typeof(HeroRoundGird.GirdNode)); |
| | | |
| | | UnityEngine.Vector3 gen_ret = gen_to_be_invoked.GetRealPos( _node ); |
| | | translator.PushUnityEngineVector3(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_Get(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | HeroRoundGird gen_to_be_invoked = (HeroRoundGird)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _row = LuaAPI.xlua_tointeger(L, 2); |
| | | int _column = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | HeroRoundGird.GirdNode gen_ret = gen_to_be_invoked.Get( _row, _column ); |
| | | 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_UnInit(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | HeroRoundGird gen_to_be_invoked = (HeroRoundGird)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.UnInit( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Init(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | HeroRoundGird gen_to_be_invoked = (HeroRoundGird)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _row = LuaAPI.xlua_tointeger(L, 2); |
| | | int _column = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | gen_to_be_invoked.Init( _row, _column ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Request(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | HeroRoundGird gen_to_be_invoked = (HeroRoundGird)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | uint _sid = LuaAPI.xlua_touint(L, 2); |
| | | UnityEngine.Vector3 _pos;translator.Get(L, 3, out _pos); |
| | | float _limitDis = (float)LuaAPI.lua_tonumber(L, 4); |
| | | |
| | | HeroRoundGird.GirdNode gen_ret = gen_to_be_invoked.Request( _sid, _pos, _limitDis ); |
| | | 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_Release(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | HeroRoundGird gen_to_be_invoked = (HeroRoundGird)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _id = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | gen_to_be_invoked.Release( _id ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: c7f7b80b965ec2e49ae4a3e97dfd0467 |
| | | timeCreated: 1562567675 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | #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; |
| | | |
| | | |
| | | namespace XLua.CSObjectWrap |
| | | { |
| | | public class SnxxzUIIPetHorseAwakingBridge : LuaBase, Snxxz.UI.IPetHorseAwaking |
| | | { |
| | | public static LuaBase __Create(int reference, LuaEnv luaenv) |
| | | { |
| | | return new SnxxzUIIPetHorseAwakingBridge(reference, luaenv); |
| | | } |
| | | |
| | | public SnxxzUIIPetHorseAwakingBridge(int reference, LuaEnv luaenv) : base(reference, luaenv) |
| | | { |
| | | } |
| | | |
| | | |
| | | public bool IsOpen() |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | | { |
| | | #endif |
| | | RealStatePtr L = luaEnv.L; |
| | | int err_func = LuaAPI.load_error_func(L, luaEnv.errorFuncRef); |
| | | |
| | | |
| | | LuaAPI.lua_getref(L, luaReference); |
| | | LuaAPI.xlua_pushasciistring(L, "IsOpen"); |
| | | if (0 != LuaAPI.xlua_pgettable(L, -2)) |
| | | { |
| | | luaEnv.ThrowExceptionFromError(err_func - 1); |
| | | } |
| | | if(!LuaAPI.lua_isfunction(L, -1)) |
| | | { |
| | | LuaAPI.xlua_pushasciistring(L, "no such function IsOpen"); |
| | | luaEnv.ThrowExceptionFromError(err_func - 1); |
| | | } |
| | | LuaAPI.lua_pushvalue(L, -2); |
| | | LuaAPI.lua_remove(L, -3); |
| | | |
| | | int __gen_error = LuaAPI.lua_pcall(L, 1, 1, err_func); |
| | | if (__gen_error != 0) |
| | | luaEnv.ThrowExceptionFromError(err_func - 1); |
| | | |
| | | |
| | | bool __gen_ret = LuaAPI.lua_toboolean(L, err_func + 1); |
| | | LuaAPI.lua_settop(L, err_func - 1); |
| | | return __gen_ret; |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public event System.Action onFuncStateUpdate |
| | | { |
| | | add |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | | { |
| | | #endif |
| | | RealStatePtr L = luaEnv.L; |
| | | int err_func = LuaAPI.load_error_func(L, luaEnv.errorFuncRef); |
| | | ObjectTranslator translator = luaEnv.translator; |
| | | |
| | | LuaAPI.lua_getref(L, luaReference); |
| | | LuaAPI.xlua_pushasciistring(L, "add_onFuncStateUpdate"); |
| | | if (0 != LuaAPI.xlua_pgettable(L, -2)) |
| | | { |
| | | luaEnv.ThrowExceptionFromError(err_func - 1); |
| | | } |
| | | if(!LuaAPI.lua_isfunction(L, -1)) |
| | | { |
| | | LuaAPI.xlua_pushasciistring(L, "no such function add_onFuncStateUpdate"); |
| | | luaEnv.ThrowExceptionFromError(err_func - 1); |
| | | } |
| | | LuaAPI.lua_pushvalue(L, -2); |
| | | LuaAPI.lua_remove(L, -3); |
| | | translator.Push(L, value); |
| | | |
| | | int __gen_error = LuaAPI.lua_pcall(L, 2, 0, err_func); |
| | | if (__gen_error != 0) |
| | | luaEnv.ThrowExceptionFromError(err_func - 1); |
| | | |
| | | LuaAPI.lua_settop(L, err_func - 1); |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | remove |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | | { |
| | | #endif |
| | | RealStatePtr L = luaEnv.L; |
| | | int err_func = LuaAPI.load_error_func(L, luaEnv.errorFuncRef); |
| | | ObjectTranslator translator = luaEnv.translator; |
| | | |
| | | LuaAPI.lua_getref(L, luaReference); |
| | | LuaAPI.xlua_pushasciistring(L, "remove_onFuncStateUpdate"); |
| | | if (0 != LuaAPI.xlua_pgettable(L, -2)) |
| | | { |
| | | luaEnv.ThrowExceptionFromError(err_func - 1); |
| | | } |
| | | if(!LuaAPI.lua_isfunction(L, -1)) |
| | | { |
| | | LuaAPI.xlua_pushasciistring(L, "no such function remove_onFuncStateUpdate"); |
| | | luaEnv.ThrowExceptionFromError(err_func - 1); |
| | | } |
| | | LuaAPI.lua_pushvalue(L, -2); |
| | | LuaAPI.lua_remove(L, -3); |
| | | translator.Push(L, value); |
| | | |
| | | int __gen_error = LuaAPI.lua_pcall(L, 2, 0, err_func); |
| | | if (__gen_error != 0) |
| | | luaEnv.ThrowExceptionFromError(err_func - 1); |
| | | |
| | | LuaAPI.lua_settop(L, err_func - 1); |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | } |
| | | #endif |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 2be204af579a6834998796ef7265adf5 |
| | | timeCreated: 1562567675 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | translator.DelayWrapLoader(typeof(GAMgr), GAMgrWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(MapTransferUtility), MapTransferUtilityWrap.__Register); |
| | | translator.DelayWrapLoader(typeof(HeroRoundGird), HeroRoundGirdWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit5(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(HeroRoundGird.GirdNode), HeroRoundGirdGirdNodeWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(MapTransferUtility), MapTransferUtilityWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(PreFightMission), PreFightMissionWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(LuaWindowUtility), LuaWindowUtilityWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit6(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.AchievementModel), SnxxzUIAchievementModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.ActivityModel), SnxxzUIActivityModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit6(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.AlchemyModel), SnxxzUIAlchemyModelWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.KingFairyModel), SnxxzUIKingFairyModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit7(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(UnionTaskModel), UnionTaskModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.FairylandCeremonyModel), SnxxzUIFairylandCeremonyModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit7(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(FakeDungeonUtility), FakeDungeonUtilityWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.LoginAdModel), SnxxzUILoginAdModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit8(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(CapacityDelayModel), CapacityDelayModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(CoinTaskTipModel), CoinTaskTipModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit8(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(FeatureNoticeModel), FeatureNoticeModelWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.RuneModel), SnxxzUIRuneModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit9(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.RuneResolveModel), SnxxzUIRuneResolveModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.RuneTowerModel), SnxxzUIRuneTowerModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit9(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.ExpertSkillSelectWin), SnxxzUIExpertSkillSelectWinWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.OneLevelWin), SnxxzUIOneLevelWinWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit10(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.WindowCenter), SnxxzUIWindowCenterWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(WindowJumpMgr), WindowJumpMgrWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit10(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(JumpUIType), JumpUITypeWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(TreasureCategory), TreasureCategoryWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit11(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(TreasureState), TreasureStateWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(FunctionUnlockType), FunctionUnlockTypeWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit11(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(RedPointState), RedPointStateWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.AddInterfaceBridgeCreator(typeof(Snxxz.UI.ILuaOpenServerActivity), SnxxzUIILuaOpenServerActivityBridge.__Create); |
| | | |
| | | translator.AddInterfaceBridgeCreator(typeof(Snxxz.UI.IPetHorseAwaking), SnxxzUIIPetHorseAwakingBridge.__Create); |
| | | |
| | | translator.AddInterfaceBridgeCreator(typeof(Snxxz.UI.ISkillMatch), SnxxzUIISkillMatchBridge.__Create); |
| | | |
| | | } |
| | |
| | | <type fullname="BossFakeLineUtility" preserve="all"/> |
| | | <type fullname="BattleEffectPlayRule" preserve="all"/> |
| | | <type fullname="GAMgr" preserve="all"/> |
| | | <type fullname="HeroRoundGird" preserve="all"/> |
| | | <type fullname="HeroRoundGird+GirdNode" preserve="all"/> |
| | | <type fullname="MapTransferUtility" preserve="all"/> |
| | | <type fullname="PreFightMission" preserve="all"/> |
| | | <type fullname="PrepareHandler" preserve="all"/> |
| | |
| | | PetStone = 2,//灵宠魂石
|
| | | }
|
| | |
|
| | | [XLua.CSharpCallLua]
|
| | | public interface IPetHorseAwaking
|
| | | {
|
| | | event Action onFuncStateUpdate;
|
| | | bool IsOpen();
|
| | | }
|
| | |
|
| | | public class PetModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | public Dictionary<int, int> _TagPetItem = new Dictionary<int, int>();//关于灵兽魂石
|
| | |
| | | {
|
| | | public class PetWin : OneLevelWin
|
| | | {
|
| | | Dictionary<int, FunctionButton> m_FunctionButtons = new Dictionary<int, FunctionButton>();
|
| | |
|
| | | PetModel petmodel { get { return ModelCenter.Instance.GetModel<PetModel>(); } }
|
| | | MountModel mountModel { get { return ModelCenter.Instance.GetModel<MountModel>(); } }
|
| | |
|
| | | protected override void BindController()
|
| | | {
|
| | | m_TitleIcon = this.GetComponent<Image>("Pivot/Container_BackGround/Img_Title"); |
| | | m_Group = this.GetComponent<FunctionButtonGroup>("Pivot/Container_Functions"); |
| | | m_Left = this.GetComponent<Button>("Pivot/Container_Buttons/Btn_Left"); |
| | | m_Right = this.GetComponent<Button>("Pivot/Container_Buttons/Btn_Right"); |
| | | m_Close = this.GetComponent<Button>("Pivot/Container_Buttons/Btn_Close"); |
| | | |
| | | m_SubWindowContainer = this.GetComponent<RectTransform>("Pivot/Container_SubWindow"); |
| | | |
| | | var name = this.GetType().Name; |
| | | var infos = WindowConfig.GetWindowFunctionInfos(name); |
| | | foreach (var info in infos) |
| | | { |
| | | m_FunctionButtons.Add(info.order,
|
| | | m_Group.AddFunction("FunctionButton_Pattern_1", info.order, info.functionId, Language.Get(info.titleKey), info.redPointId)); |
| | | } |
| | | |
| | | m_TitleIcon.SetSprite(WindowConfig.GetTitleIconKey(name)); |
| | | m_TitleIcon.SetNativeSize();
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | base.AddListeners();
|
| | | SetFunctionListener(0, OpenMountWin);
|
| | | SetFunctionListener(1, OpenPetWin);
|
| | | SetFunctionListener(2, OpenPetHorseAwakingWin);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | base.OnPreOpen();
|
| | | DisplayButtons();
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | |
| | | base.OnActived();
|
| | | }
|
| | |
|
| | | private void DisplayButtons()
|
| | | {
|
| | | var petHorseAwaking = LuaUtility.Global.Get<IPetHorseAwaking>("PetHorseAwakingModel");
|
| | | if (petHorseAwaking != null)
|
| | | {
|
| | | var isOpen = petHorseAwaking.IsOpen();
|
| | | m_FunctionButtons[2].gameObject.SetActive(isOpen);
|
| | | m_FunctionButtons[2].state = isOpen ? TitleBtnState.Normal : TitleBtnState.Locked;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_FunctionButtons[2].gameObject.SetActive(false);
|
| | | m_FunctionButtons[2].state = TitleBtnState.Locked;
|
| | | }
|
| | | }
|
| | |
|
| | | private void OpenPetWin()
|
| | | {
|
| | | CloseSubWindows();
|
| | |
| | | functionOrder = 1;
|
| | | }
|
| | |
|
| | | private void OpenPetHorseAwakingWin()
|
| | | {
|
| | | CloseSubWindows();
|
| | | WindowCenter.Instance.Open("PetHorseAwakingWin", true);
|
| | | functionOrder = 2;
|
| | | }
|
| | |
|
| | | }
|
| | | }
|