| | |
| | | }
|
| | | }
|
| | |
|
| | | public void SetParticleEmissionRateOverTime(float value)
|
| | | {
|
| | | if (m_CacheParticleSystem != null)
|
| | | {
|
| | | ParticleSystem.EmissionModule _emissioinModule;
|
| | | for (int i = 0; i < m_CacheParticleSystem.Length; ++i)
|
| | | {
|
| | | if (m_CacheParticleSystem[i])
|
| | | {
|
| | | _emissioinModule = m_CacheParticleSystem[i].emission;
|
| | | _emissioinModule.rateOverTime = value;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void SetChildActive(Transform transforms, bool active)
|
| | | {
|
| | | for (int i = 0; i < transforms.childCount; ++i)
|
| | |
| | | #endif |
| | | } |
| | | |
| | | public int GetPetHorseEffect(int id, int skinIndex) |
| | | { |
| | | #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, "GetPetHorseEffect"); |
| | | 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 GetPetHorseEffect"); |
| | | luaEnv.ThrowExceptionFromError(err_func - 1); |
| | | } |
| | | LuaAPI.lua_pushvalue(L, -2); |
| | | LuaAPI.lua_remove(L, -3); |
| | | LuaAPI.xlua_pushinteger(L, id); |
| | | LuaAPI.xlua_pushinteger(L, skinIndex); |
| | | |
| | | int __gen_error = LuaAPI.lua_pcall(L, 3, 1, err_func); |
| | | if (__gen_error != 0) |
| | | luaEnv.ThrowExceptionFromError(err_func - 1); |
| | | |
| | | |
| | | int __gen_ret = LuaAPI.xlua_tointeger(L, err_func + 1); |
| | | LuaAPI.lua_settop(L, err_func - 1); |
| | | return __gen_ret; |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.PetModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 27, 18, 14); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 28, 18, 14); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSkillUnlockLevel", _m_GetSkillUnlockLevel); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsPetMaxLevel", _m_IsPetMaxLevel); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsPetUnlock", _m_IsPetUnlock); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetPetHorseEffect", _m_GetPetHorseEffect); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "PlayerLoginOkData", _e_PlayerLoginOkData); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "onPetInfoUpdate", _e_onPetInfoUpdate); |
| | |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetPetHorseEffect(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.PetModel gen_to_be_invoked = (Snxxz.UI.PetModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _id = LuaAPI.xlua_tointeger(L, 2); |
| | | int _skinIndex = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetPetHorseEffect( _id, _skinIndex ); |
| | | LuaAPI.xlua_pushinteger(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| 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 SnxxzUIUI3DHorsePetDataWrap |
| | | { |
| | | public static void __Register(RealStatePtr L) |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.UI3DHorsePetData); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 5, 5); |
| | | |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "id", _g_get_id); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "skinIndex", _g_get_skinIndex); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "isRun", _g_get_isRun); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "offset", _g_get_offset); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "localEulerAngles", _g_get_localEulerAngles); |
| | | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "id", _s_set_id); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "skinIndex", _s_set_skinIndex); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "isRun", _s_set_isRun); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "offset", _s_set_offset); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "localEulerAngles", _s_set_localEulerAngles); |
| | | |
| | | |
| | | 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) |
| | | { |
| | | translator.Push(L, default(Snxxz.UI.UI3DHorsePetData)); |
| | | return 1; |
| | | } |
| | | |
| | | } |
| | | catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.UI3DHorsePetData constructor!"); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_id(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.UI3DHorsePetData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.id); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_skinIndex(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.UI3DHorsePetData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.skinIndex); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_isRun(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.UI3DHorsePetData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | LuaAPI.lua_pushboolean(L, gen_to_be_invoked.isRun); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_offset(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.UI3DHorsePetData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | translator.PushUnityEngineVector3(L, gen_to_be_invoked.offset); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_localEulerAngles(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.UI3DHorsePetData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | translator.PushUnityEngineVector3(L, gen_to_be_invoked.localEulerAngles); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_id(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.UI3DHorsePetData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | gen_to_be_invoked.id = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | translator.Update(L, 1, gen_to_be_invoked); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_skinIndex(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.UI3DHorsePetData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | gen_to_be_invoked.skinIndex = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | translator.Update(L, 1, gen_to_be_invoked); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_isRun(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.UI3DHorsePetData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | gen_to_be_invoked.isRun = LuaAPI.lua_toboolean(L, 2); |
| | | |
| | | translator.Update(L, 1, gen_to_be_invoked); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_offset(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.UI3DHorsePetData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | UnityEngine.Vector3 gen_value;translator.Get(L, 2, out gen_value); |
| | | gen_to_be_invoked.offset = gen_value; |
| | | |
| | | translator.Update(L, 1, gen_to_be_invoked); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_localEulerAngles(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.UI3DHorsePetData gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | UnityEngine.Vector3 gen_value;translator.Get(L, 2, out gen_value); |
| | | gen_to_be_invoked.localEulerAngles = gen_value; |
| | | |
| | | translator.Update(L, 1, gen_to_be_invoked); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a86ca65d13410904495a926d17698daf |
| | | timeCreated: 1562737327 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.UI3DModelExhibition); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 10, 3, 3); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 11, 3, 3); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetName", _m_GetName); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ShowLoginPlayer", _m_ShowLoginPlayer); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ShowEquipment", _m_ShowEquipment); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ShowWing", _m_ShowWing); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ShowNPC", _m_ShowNPC); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ShowPet", _m_ShowPet); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "StopShow", _m_StopShow); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ResetCameraColor", _m_ResetCameraColor); |
| | | |
| | |
| | | Snxxz.UI.UI3DModelExhibition gen_to_be_invoked = (Snxxz.UI.UI3DModelExhibition)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)&& translator.Assignable<UnityEngine.UI.RawImage>(L, 3)) |
| | | { |
| | | int _modelId = LuaAPI.xlua_tointeger(L, 2); |
| | | UnityEngine.UI.RawImage _rawImage = (UnityEngine.UI.RawImage)translator.GetObject(L, 3, typeof(UnityEngine.UI.RawImage)); |
| | |
| | | |
| | | return 0; |
| | | } |
| | | if(gen_param_count == 3&& translator.Assignable<Snxxz.UI.UI3DHorsePetData>(L, 2)&& translator.Assignable<UnityEngine.UI.RawImage>(L, 3)) |
| | | { |
| | | Snxxz.UI.UI3DHorsePetData _data;translator.Get(L, 2, out _data); |
| | | UnityEngine.UI.RawImage _rawImage = (UnityEngine.UI.RawImage)translator.GetObject(L, 3, typeof(UnityEngine.UI.RawImage)); |
| | | |
| | | gen_to_be_invoked.ShowHourse( _data, _rawImage ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.UI3DModelExhibition.ShowHourse!"); |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_ShowPet(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.UI3DModelExhibition gen_to_be_invoked = (Snxxz.UI.UI3DModelExhibition)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | Snxxz.UI.UI3DHorsePetData _data;translator.Get(L, 2, out _data); |
| | | UnityEngine.UI.RawImage __rawImage = (UnityEngine.UI.RawImage)translator.GetObject(L, 3, typeof(UnityEngine.UI.RawImage)); |
| | | |
| | | gen_to_be_invoked.ShowPet( _data, __rawImage ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_StopShow(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.UI3DModelExhibition), SnxxzUIUI3DModelExhibitionWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.UI3DHorsePetData), SnxxzUIUI3DHorsePetDataWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(UIDragDropBehaviour), UIDragDropBehaviourWrap.__Register); |
| | | |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(MakeType), MakeTypeWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(TitleType), TitleTypeWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit11(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(TitleType), TitleTypeWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(FuncOpenEnum), FuncOpenEnumWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(TransformExtension), TransformExtensionWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(UIHelper), UIHelperWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit12(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(UIHelper), UIHelperWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(UIUtility), UIUtilityWrap.__Register); |
| | | |
| | | |
| | |
| | | <type fullname="Snxxz.UI.SmoothSlider" preserve="all"/> |
| | | <type fullname="TimeDownMgr" preserve="all"/> |
| | | <type fullname="Snxxz.UI.UI3DModelExhibition" preserve="all"/> |
| | | <type fullname="Snxxz.UI.UI3DHorsePetData" preserve="all"/> |
| | | <type fullname="UIDragDropBehaviour" preserve="all"/> |
| | | <type fullname="ButtonEx" preserve="all"/> |
| | | <type fullname="ImageEx" preserve="all"/> |
| | |
| | | {
|
| | | event Action onFuncStateUpdate;
|
| | | bool IsOpen();
|
| | | int GetPetHorseEffect(int id, int skinIndex);
|
| | | }
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | |
| | | {
|
| | | return _DicPetBack.ContainsKey(petId);
|
| | | } |
| | | |
| | | public int GetPetHorseEffect(int id,int skinIndex)
|
| | | {
|
| | | var petHorseAwaking = LuaUtility.Global.Get<IPetHorseAwaking>("PetHorseAwakingModel");
|
| | | return petHorseAwaking.GetPetHorseEffect(id, skinIndex);
|
| | | } |
| | | }
|
| | | } |
| | |
| | | // [ Date ]: Saturday, September 09, 2017
|
| | | //--------------------------------------------------------
|
| | | using Snxxz.UI;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | using UnityEngine;
|
| | |
| | |
|
| | | SFXController godWeaponEffect = null;
|
| | |
|
| | | SFXController horsePetEffect = null;
|
| | |
|
| | | Coroutine m_SwtichAnimationCoroutine = null;
|
| | |
|
| | | bool isShowingPlayer = false;
|
| | | bool isShowingHorse = false;
|
| | | bool isShowingNPC = false;
|
| | | bool isShowingPet = false;
|
| | | bool isShowinEquipment = false;
|
| | |
|
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
|
| | | ReikiRootModel reikiRootModel { get { return ModelCenter.Instance.GetModel<ReikiRootModel>(); } }
|
| | | PetModel petModel { get { return ModelCenter.Instance.GetModel<PetModel>(); } }
|
| | |
|
| | | static UI3DModelExhibition m_Instance = null;
|
| | | public static UI3DModelExhibition Instance {
|
| | |
| | | BindGestureCatcher(rawImage, interactable);
|
| | | }
|
| | |
|
| | | public void ShowHourse(UI3DHorsePetData data, RawImage rawImage)
|
| | | {
|
| | | StopShow();
|
| | | m_ShowCamera.enabled = true;
|
| | |
|
| | | var horseConfig = HorseConfig.Get(data.id);
|
| | | if (horseConfig == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | var instance = UI3DModelFactory.LoadUIHorse(horseConfig.Model);
|
| | | if (instance == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | isShowingHorse = true;
|
| | | interactable = true;
|
| | |
|
| | | m_HorseModelId = horseConfig.Model;
|
| | | horseModel = instance;
|
| | |
|
| | | m_HorseShowPoint.rotation = Quaternion.identity;
|
| | |
|
| | | var modelConfig = ModelResConfig.Get(horseConfig.Model);
|
| | | var position = modelConfig.UIOffset;
|
| | | var rotation = modelConfig.UIRotation;
|
| | | instance.transform.SetParentEx(m_HorseShowPoint, position, rotation, modelConfig.UIScale);
|
| | | instance.SetActive(true);
|
| | | ResetCameraColor();
|
| | |
|
| | | ShowNpcEffect(instance.transform, modelConfig.ResourcesName);
|
| | |
|
| | | if (horseModel && data.isRun)
|
| | | {
|
| | | var animator = horseModel.GetComponentInChildren<Animator>();
|
| | | if (animator != null)
|
| | | {
|
| | | m_SwtichAnimationCoroutine = StartCoroutine(Co_SwitchAnimation(animator, GAStaticDefine.State_RunHash));
|
| | | }
|
| | | }
|
| | |
|
| | | if (horseModel && data.skinIndex > 0)
|
| | | {
|
| | | var horsePetEffectId = petModel.GetPetHorseEffect(data.id, data.skinIndex);
|
| | | if (horsePetEffectId != 0)
|
| | | {
|
| | | horsePetEffect = SFXPlayUtility.Instance.Play(horsePetEffectId, horseModel.transform);
|
| | | if (horsePetEffect != null)
|
| | | {
|
| | | horsePetEffect.duration = 0f;
|
| | | horsePetEffect.SetParticleEmissionRateOverTime(2f);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | BindGestureCatcher(rawImage, interactable);
|
| | | }
|
| | |
|
| | | private GameObject ObjEquipment;
|
| | | public void ShowEquipment(int modelId, Vector3 localEulerAngles, float scale, RawImage rawImage)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void ShowPet(UI3DHorsePetData data, RawImage _rawImage)
|
| | | {
|
| | | StopShow();
|
| | | m_ShowCamera.enabled = true;
|
| | | m_NPCId = data.id;
|
| | |
|
| | | var instance = UI3DModelFactory.LoadUINPC(data.id);
|
| | | if (instance == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | interactable = true;
|
| | | isShowingPet = true;
|
| | |
|
| | | m_NPCShowPoint.localEulerAngles = data.localEulerAngles;
|
| | |
|
| | | npcModel = instance;
|
| | | var config = NPCConfig.Get(data.id);
|
| | | instance.transform.SetParentEx(m_NPCShowPoint, data.offset, Quaternion.identity, Vector3.one * config.UIModeLProportion);
|
| | | if (config.NPCEffect != 0)
|
| | | {
|
| | | var effectConfig = EffectConfig.Get(config.NPCEffect);
|
| | | var parent = instance.transform;
|
| | | if (!string.IsNullOrEmpty(effectConfig.nodeName))
|
| | | {
|
| | | parent = instance.transform.GetChildTransformDeeply(effectConfig.nodeName);
|
| | | }
|
| | | m_NpcEffect = SFXPlayUtility.Instance.PlayBattleEffect(config.NPCEffect, parent);
|
| | | }
|
| | |
|
| | | instance.SetActive(true);
|
| | |
|
| | | if (npcModel)
|
| | | {
|
| | | ShowNpcEffect(npcModel.transform, config.MODE);
|
| | | }
|
| | |
|
| | | if (npcModel && data.isRun)
|
| | | {
|
| | | var animator = npcModel.GetComponentInChildren<Animator>();
|
| | | if (animator != null)
|
| | | {
|
| | | m_SwtichAnimationCoroutine = StartCoroutine(Co_SwitchAnimation(animator, GAStaticDefine.State_RunHash));
|
| | | }
|
| | | }
|
| | |
|
| | | if (npcModel && data.skinIndex > 0)
|
| | | {
|
| | | var horsePetEffectId = petModel.GetPetHorseEffect(data.id, data.skinIndex);
|
| | | if (horsePetEffectId != 0)
|
| | | {
|
| | | horsePetEffect = SFXPlayUtility.Instance.Play(horsePetEffectId, npcModel.transform);
|
| | | if (horsePetEffect != null)
|
| | | {
|
| | | horsePetEffect.duration = 0f;
|
| | | horsePetEffect.SetParticleEmissionRateOverTime(2f);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | ResetCameraColor();
|
| | |
|
| | | if (data.id == 10104001)
|
| | | {
|
| | | _rawImage.gameObject.SetActive(false);
|
| | | UI3DModelShowSpecialNPC.Display(npcModel);
|
| | | }
|
| | | else
|
| | | {
|
| | | BindGestureCatcher(_rawImage, interactable);
|
| | | }
|
| | | }
|
| | |
|
| | | public void StopShow()
|
| | | {
|
| | | m_ShowCamera.enabled = false;
|
| | |
|
| | | playerModel.Dispose();
|
| | | isShowingPlayer = false;
|
| | |
|
| | | if (m_SwtichAnimationCoroutine != null)
|
| | | {
|
| | | StopCoroutine(m_SwtichAnimationCoroutine);
|
| | | m_SwtichAnimationCoroutine = null;
|
| | | }
|
| | |
|
| | | if (m_NPCId != 0)
|
| | | {
|
| | |
| | | m_NpcEffect = null;
|
| | | }
|
| | |
|
| | | if (isShowingPet)
|
| | | {
|
| | | var animator = npcModel.GetComponentInChildren<Animator>();
|
| | | if (animator != null)
|
| | | {
|
| | | animator.Play(GAStaticDefine.State_IdleHash, 0);
|
| | | }
|
| | | }
|
| | |
|
| | | UI3DModelFactory.ReleaseUINPC(m_NPCId, npcModel);
|
| | | npcModel = null;
|
| | | }
|
| | |
|
| | | m_NPCId = 0;
|
| | | isShowingNPC = false;
|
| | | isShowingPet = false;
|
| | |
|
| | | if (horseModel != null)
|
| | | {
|
| | | horseModel.transform.localScale = Vector3.one;
|
| | | var animator = horseModel.GetComponentInChildren<Animator>();
|
| | | if (animator != null)
|
| | | {
|
| | | animator.Play(GAStaticDefine.State_IdleHash, 0);
|
| | | }
|
| | | UI3DModelFactory.ReleaseUIHourse(m_HorseModelId, horseModel);
|
| | | horseModel = null;
|
| | | }
|
| | |
| | | {
|
| | | SFXPlayUtility.Instance.Release(godWeaponEffect);
|
| | | godWeaponEffect = null;
|
| | | }
|
| | |
|
| | | if (horsePetEffect != null)
|
| | | {
|
| | | horsePetEffect.SetParticleEmissionRateOverTime(0f);
|
| | | SFXPlayUtility.Instance.Release(horsePetEffect);
|
| | | horsePetEffect = null;
|
| | | }
|
| | |
|
| | | UI3DModelShowSpecialNPC.Dispose();
|
| | |
| | | }
|
| | |
|
| | | if (isShowingNPC)
|
| | | {
|
| | | m_NPCShowPoint.localEulerAngles += new Vector3(0, -deltaPosition.x, 0);
|
| | | }
|
| | |
|
| | |
|
| | | if (isShowingPet)
|
| | | {
|
| | | m_NPCShowPoint.localEulerAngles += new Vector3(0, -deltaPosition.x, 0);
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | IEnumerator Co_SwitchAnimation(Animator animator,int stateHash)
|
| | | {
|
| | | yield return null;
|
| | | if (animator != null)
|
| | | {
|
| | | animator.Play(stateHash, 0);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public struct UI3DPlayerExhibitionData
|
| | |
| | | public bool gray;
|
| | | public bool isDialogue;
|
| | | }
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public struct UI3DHorsePetData
|
| | | {
|
| | | public int id;
|
| | | public int skinIndex;
|
| | | public bool isRun;
|
| | | public Vector3 offset;
|
| | | public Vector3 localEulerAngles;
|
| | | }
|
| | | }
|
| | |
|
| | |
|