Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | } |
| | | } |
| | | |
| | | public bool HasDropItem() |
| | | { |
| | | return m_DropItemList.Count > 0; |
| | | } |
| | | |
| | | public void Update() |
| | | { |
| | | var _hero = PlayerDatas.Instance.hero; |
| | |
| | | }
|
| | | }
|
| | |
|
| | | private SFXController m_ReikiEffect;
|
| | |
|
| | | protected override void OnMainModelLoaded()
|
| | | {
|
| | | RequestMissionSign();
|
| | |
| | | int _secondaryId = _ids.Length > 1 ? int.Parse(_ids[1]) : -1;
|
| | | int _horseId = _ids.Length > 2 ? int.Parse(_ids[2]) : -1;
|
| | | int _wingId = _ids.Length > 3 ? int.Parse(_ids[3]) : -1;
|
| | | int _reikiId = _ids.Length > 4 ? int.Parse(_ids[4]) : -1;
|
| | |
|
| | | // Debug.LogFormat("weapon: {0}, secondary: {1}, horse: {2}, wing: {3}", _weaponId, _secondaryId, _horseId, _weaponId);
|
| | |
|
| | |
| | | if (_horseId > 0)
|
| | | {
|
| | | SetEquipHorse(_horseId);
|
| | | }
|
| | |
|
| | | if (ReikiRootEffectConfig.Has(_reikiId))
|
| | | {
|
| | | if (m_ReikiEffect)
|
| | | {
|
| | | SFXPlayUtility.Instance.Release(m_ReikiEffect);
|
| | | m_ReikiEffect = null;
|
| | | }
|
| | | var _config = ReikiRootEffectConfig.Get(_reikiId);
|
| | | m_ReikiEffect = SFXPlayUtility.Instance.PlayBattleEffect(_config.effect, Root, 1);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | protected override void OnUnit()
|
| | | {
|
| | | if (m_ReikiEffect)
|
| | | {
|
| | | SFXPlayUtility.Instance.Release(m_ReikiEffect);
|
| | | m_ReikiEffect = null;
|
| | | }
|
| | |
|
| | | if (m_WeaponModel)
|
| | | {
|
| | | var _prefab = InstanceResourcesLoader.LoadModelRes(m_WeaponID);
|
| | |
| | |
|
| | | private void OnPrefabLoadFinished(bool result, UnityEngine.Object prefab)
|
| | | {
|
| | |
|
| | |
|
| | | if (!result || prefab == null)
|
| | | {
|
| | | if (!m_LoadDefaultRes)
|
| | | {
|
| | | InstanceResourcesLoader.AsyncLoadDefaultFuncNpc(OnPrefabLoadFinished);
|
| | |
|
| | | m_LoadDefaultRes = true;
|
| | | if (this is GA_Pet)
|
| | | {
|
| | | InstanceResourcesLoader.AsyncLoadDefaultPet(OnPrefabLoadFinished);
|
| | |
| | | {
|
| | | InstanceResourcesLoader.AsyncLoadDefaultFightNpc(OnPrefabLoadFinished);
|
| | | }
|
| | |
|
| | | m_LoadDefaultRes = true;
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | |
|
| | | if (m_LoadDefaultRes)
|
| | | {
|
| | | GameObjectPoolManager.Instance.ReleaseDefaultFightNPC(m_Model);
|
| | | if (this is GA_Pet)
|
| | | {
|
| | | GameObjectPoolManager.Instance.ReleaseDefaultPet(m_Model);
|
| | | }
|
| | | else
|
| | | {
|
| | | GameObjectPoolManager.Instance.ReleaseDefaultFightNPC(m_Model);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | |
|
| | | SystemSetting.Instance.qualityLevelChangeEvent -= OnGameQualityChange;
|
| | | dungeonModel.updateMissionEvent -= CheckAncientHeadUp;
|
| | |
|
| | | RlsLingGenEffect();
|
| | | base.OnUnit();
|
| | | }
|
| | |
|
| | |
| | | return;
|
| | | }
|
| | | RlsLingGenEffect();
|
| | | if (!LingGenNode)
|
| | | {
|
| | | LingGenNode = new GameObject();
|
| | | GameObject.DontDestroyOnLoad(LingGenNode);
|
| | | }
|
| | | var _config = ReikiRootEffectConfig.Get(id);
|
| | | var _sfx = SFXPlayUtility.Instance.PlayBattleEffect(_config.effect, LingGenNode.transform, 1);
|
| | | lingGenEffectList.Add(_sfx);
|
| | | var _effectConfig = EffectConfig.Get(_config.effect);
|
| | | if (_effectConfig.fxName.EndsWith("09")
|
| | | || _effectConfig.fxName.EndsWith("10")
|
| | | || _effectConfig.fxName.EndsWith("11"))
|
| | | {
|
| | | var _sfx = SFXPlayUtility.Instance.PlayBattleEffect(_config.effect, Root, 1);
|
| | | lingGenEffectList.Add(_sfx);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (!LingGenNode)
|
| | | {
|
| | | LingGenNode = new GameObject();
|
| | | GameObject.DontDestroyOnLoad(LingGenNode);
|
| | | }
|
| | |
|
| | | var _sfx = SFXPlayUtility.Instance.PlayBattleEffect(_config.effect, LingGenNode.transform, 1);
|
| | | lingGenEffectList.Add(_sfx);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | using H2Engine; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | |
| | | } |
| | | |
| | | public Vector3 lastDeadPos { get; set; } |
| | | |
| | | private bool HasStartCheck = false; |
| | | public void NpcDead(int eventID, GActor npc, int npcID) |
| | | { |
| | | if (eventID < 0 || npc == null) |
| | |
| | | lastDeadPos = npc.Pos; |
| | | } |
| | | |
| | | private IEnumerator DoWaitFakePickup() |
| | | { |
| | | yield return WaitingForSecondConst.WaitMS500; |
| | | while (ClientDropItemUtility.Instance.HasDropItem()) |
| | | { |
| | | yield return null; |
| | | } |
| | | |
| | | CA225_tagCMClientTaskCount _a225 = new CA225_tagCMClientTaskCount |
| | | { |
| | | CountID = 10001 |
| | | }; |
| | | GameNetSystem.Instance.SendInfo(_a225); |
| | | } |
| | | |
| | | public void Handle_0820(H0820_tagMissionDict package) |
| | | { |
| | | if (package.DictKey.Equals("gonpc")) |
| | | { |
| | | MapTransferUtility.Instance.MoveToNPC((int)package.DictValue); |
| | | } |
| | | |
| | | m_ReadyRemoveTriggerList.Clear(); |
| | | |
| | | foreach (var _triggerID in m_TriggerIDToMissionIDDict.Keys) |
| | |
| | | m_TriggerIDToMissionIDDict.Remove(_id); |
| | | } |
| | | |
| | | |
| | | if (package.DictKey.Equals("riggerID")) |
| | | { |
| | | int _triggerID = (int)package.DictValue; |
| | |
| | | { |
| | | SnxxzGame.Instance.StartCoroutine(DelayUnTrigger(_removeTriggerID)); |
| | | } |
| | | SnxxzGame.Instance.StartCoroutine(DoWaitFakePickup()); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | m_EventHandlerDict.Add(_refreshEvent.GetEventID(), _refreshEvent); |
| | | } |
| | | HasStartCheck = false; |
| | | } |
| | | } |
| | | |
| 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 CyclicScrollWrap |
| | | { |
| | | public static void __Register(RealStatePtr L) |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(CyclicScroll); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 8, 11, 1); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "LuaInit", _m_LuaInit); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Dispose", _m_Dispose); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "HideAll", _m_HideAll); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "MoveToCenter", _m_MoveToCenter); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeginDrag", _m_OnBeginDrag); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnDrag", _m_OnDrag); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnEndDrag", _m_OnEndDrag); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ReArrange", _m_ReArrange); |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "content", _g_get_content); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "cellSize", _g_get_cellSize); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "spacing", _g_get_spacing); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "align", _g_get_align); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "elasticityOn", _g_get_elasticityOn); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "elasticity", _g_get_elasticity); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "decelerationRate", _g_get_decelerationRate); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "normalizedPosition", _g_get_normalizedPosition); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "autoLerp", _g_get_autoLerp); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "dataCount", _g_get_dataCount); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "rectTransform", _g_get_rectTransform); |
| | | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "normalizedPosition", _s_set_normalizedPosition); |
| | | |
| | | |
| | | 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) |
| | | { |
| | | |
| | | CyclicScroll gen_ret = new CyclicScroll(); |
| | | 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 CyclicScroll constructor!"); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_LuaInit(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int[] _indexs = (int[])translator.GetObject(L, 2, typeof(int[])); |
| | | bool _stepByStep = LuaAPI.lua_toboolean(L, 3); |
| | | |
| | | gen_to_be_invoked.LuaInit( _indexs, _stepByStep ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Dispose(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.Dispose( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_HideAll(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.HideAll( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_MoveToCenter(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int __dataIndex = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | gen_to_be_invoked.MoveToCenter( __dataIndex ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_OnBeginDrag(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.EventSystems.PointerEventData _eventData = (UnityEngine.EventSystems.PointerEventData)translator.GetObject(L, 2, typeof(UnityEngine.EventSystems.PointerEventData)); |
| | | |
| | | gen_to_be_invoked.OnBeginDrag( _eventData ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_OnDrag(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.EventSystems.PointerEventData _eventData = (UnityEngine.EventSystems.PointerEventData)translator.GetObject(L, 2, typeof(UnityEngine.EventSystems.PointerEventData)); |
| | | |
| | | gen_to_be_invoked.OnDrag( _eventData ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_OnEndDrag(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.EventSystems.PointerEventData _eventData = (UnityEngine.EventSystems.PointerEventData)translator.GetObject(L, 2, typeof(UnityEngine.EventSystems.PointerEventData)); |
| | | |
| | | gen_to_be_invoked.OnEndDrag( _eventData ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_ReArrange(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.ReArrange( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_content(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.content); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_cellSize(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | translator.PushUnityEngineVector2(L, gen_to_be_invoked.cellSize); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_spacing(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | translator.PushUnityEngineVector2(L, gen_to_be_invoked.spacing); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_align(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.align); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_elasticityOn(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushboolean(L, gen_to_be_invoked.elasticityOn); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_elasticity(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushnumber(L, gen_to_be_invoked.elasticity); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_decelerationRate(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushnumber(L, gen_to_be_invoked.decelerationRate); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_normalizedPosition(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushnumber(L, gen_to_be_invoked.normalizedPosition); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_autoLerp(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushboolean(L, gen_to_be_invoked.autoLerp); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_dataCount(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.dataCount); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_rectTransform(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.rectTransform); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_normalizedPosition(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | CyclicScroll gen_to_be_invoked = (CyclicScroll)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.normalizedPosition = (float)LuaAPI.lua_tonumber(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d5e27c48e39d6744d8e1265a00bad273 |
| | | timeCreated: 1562307067 |
| | | 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 MathUtilityWrap |
| | | { |
| | | public static void __Register(RealStatePtr L) |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(MathUtility); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | Utils.EndObjectRegister(type, L, translator, null, null, |
| | | null, null, null); |
| | | |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 19, 0, 0); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Rotate90_XZ_CW", _m_Rotate90_XZ_CW_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Rotate90_XZ_CCW", _m_Rotate90_XZ_CCW_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Rotate180_XZ", _m_Rotate180_XZ_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetGestureDirection", _m_GetGestureDirection_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "FreeFall", _m_FreeFall_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "CalculateRefrenceScale", _m_CalculateRefrenceScale_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "CalDistance", _m_CalDistance_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetBitValue", _m_GetBitValue_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "SetBitValue", _m_SetBitValue_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "IsPointInsideRectangel", _m_IsPointInsideRectangel_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetClientRotationFromAngle", _m_GetClientRotationFromAngle_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "DistanceSqrtXZ", _m_DistanceSqrtXZ_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "ForwardXZ", _m_ForwardXZ_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "IsSameDir", _m_IsSameDir_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "OppositeDir", _m_OppositeDir_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Power", _m_Power_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "CheckAdult", _m_CheckAdult_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "GetFloatFromLitJson", _m_GetFloatFromLitJson_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) |
| | | { |
| | | |
| | | MathUtility gen_ret = new MathUtility(); |
| | | 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 MathUtility constructor!"); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Rotate90_XZ_CW_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _vector;translator.Get(L, 1, out _vector); |
| | | |
| | | UnityEngine.Vector3 gen_ret = MathUtility.Rotate90_XZ_CW( _vector ); |
| | | 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_Rotate90_XZ_CCW_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _vector;translator.Get(L, 1, out _vector); |
| | | |
| | | UnityEngine.Vector3 gen_ret = MathUtility.Rotate90_XZ_CCW( _vector ); |
| | | 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_Rotate180_XZ_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _vector;translator.Get(L, 1, out _vector); |
| | | |
| | | UnityEngine.Vector3 gen_ret = MathUtility.Rotate180_XZ( _vector ); |
| | | 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_GetGestureDirection_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector2 __start;translator.Get(L, 1, out __start); |
| | | UnityEngine.Vector2 __end;translator.Get(L, 2, out __end); |
| | | |
| | | GestureType gen_ret = MathUtility.GetGestureDirection( __start, __end ); |
| | | translator.PushGestureType(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_FreeFall_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | float __startY = (float)LuaAPI.lua_tonumber(L, 1); |
| | | float __time = (float)LuaAPI.lua_tonumber(L, 2); |
| | | |
| | | float gen_ret = MathUtility.FreeFall( __startY, __time ); |
| | | LuaAPI.lua_pushnumber(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_CalculateRefrenceScale_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector2 __designWH;translator.Get(L, 1, out __designWH); |
| | | |
| | | float gen_ret = MathUtility.CalculateRefrenceScale( __designWH ); |
| | | LuaAPI.lua_pushnumber(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_CalDistance_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _srcPos;translator.Get(L, 1, out _srcPos); |
| | | UnityEngine.Vector3 _desPos;translator.Get(L, 2, out _desPos); |
| | | |
| | | float gen_ret = MathUtility.CalDistance( _srcPos, _desPos ); |
| | | LuaAPI.lua_pushnumber(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_GetBitValue_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | uint _value = LuaAPI.xlua_touint(L, 1); |
| | | ushort _index = (ushort)LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | bool gen_ret = MathUtility.GetBitValue( _value, _index ); |
| | | 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_SetBitValue_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | int _value = LuaAPI.xlua_tointeger(L, 1); |
| | | ushort _index = (ushort)LuaAPI.xlua_tointeger(L, 2); |
| | | bool _bitValue = LuaAPI.lua_toboolean(L, 3); |
| | | |
| | | int gen_ret = MathUtility.SetBitValue( _value, _index, _bitValue ); |
| | | 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_IsPointInsideRectangel_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _point;translator.Get(L, 1, out _point); |
| | | UnityEngine.Vector3 _rectStart;translator.Get(L, 2, out _rectStart); |
| | | UnityEngine.Vector3 _rectEnd;translator.Get(L, 3, out _rectEnd); |
| | | |
| | | bool gen_ret = MathUtility.IsPointInsideRectangel( _point, _rectStart, _rectEnd ); |
| | | 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_GetClientRotationFromAngle_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | int _angle = LuaAPI.xlua_tointeger(L, 1); |
| | | |
| | | UnityEngine.Quaternion gen_ret = MathUtility.GetClientRotationFromAngle( _angle ); |
| | | translator.PushUnityEngineQuaternion(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_DistanceSqrtXZ_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _p1;translator.Get(L, 1, out _p1); |
| | | UnityEngine.Vector3 _p2;translator.Get(L, 2, out _p2); |
| | | |
| | | float gen_ret = MathUtility.DistanceSqrtXZ( _p1, _p2 ); |
| | | LuaAPI.lua_pushnumber(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_ForwardXZ_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _target;translator.Get(L, 1, out _target); |
| | | UnityEngine.Vector3 _self;translator.Get(L, 2, out _self); |
| | | |
| | | UnityEngine.Vector3 gen_ret = MathUtility.ForwardXZ( _target, _self ); |
| | | 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_IsSameDir_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _vec1;translator.Get(L, 1, out _vec1); |
| | | UnityEngine.Vector3 _vec2;translator.Get(L, 2, out _vec2); |
| | | |
| | | bool gen_ret = MathUtility.IsSameDir( _vec1, _vec2 ); |
| | | 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_OppositeDir_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _vec1;translator.Get(L, 1, out _vec1); |
| | | UnityEngine.Vector3 _vec2;translator.Get(L, 2, out _vec2); |
| | | |
| | | bool gen_ret = MathUtility.OppositeDir( _vec1, _vec2 ); |
| | | 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_Power_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | int _a = LuaAPI.xlua_tointeger(L, 1); |
| | | int _e = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | int gen_ret = MathUtility.Power( _a, _e ); |
| | | 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_CheckAdult_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | string __IDNumber = LuaAPI.lua_tostring(L, 1); |
| | | |
| | | bool gen_ret = MathUtility.CheckAdult( __IDNumber ); |
| | | 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_GetFloatFromLitJson_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | LitJson.JsonData _j = (LitJson.JsonData)translator.GetObject(L, 1, typeof(LitJson.JsonData)); |
| | | |
| | | float gen_ret = MathUtility.GetFloatFromLitJson( _j ); |
| | | LuaAPI.lua_pushnumber(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 35fa87696a32d824483087b72366ad42 |
| | | timeCreated: 1562295259 |
| | | 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 ScrollItemWrap |
| | | { |
| | | public static void __Register(RealStatePtr L) |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(ScrollItem); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 6, 1, 0); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Display", _m_Display); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Dispose", _m_Dispose); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OpeningShow", _m_OpeningShow); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "LuaDisplay", _m_LuaDisplay); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "LuaDispose", _m_LuaDispose); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "LuaRegister", _m_LuaRegister); |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "rectTransform", _g_get_rectTransform); |
| | | |
| | | |
| | | |
| | | 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) |
| | | { |
| | | |
| | | ScrollItem gen_ret = new ScrollItem(); |
| | | 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 ScrollItem constructor!"); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Display(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | ScrollItem gen_to_be_invoked = (ScrollItem)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | object __data = translator.GetObject(L, 2, typeof(object)); |
| | | |
| | | gen_to_be_invoked.Display( __data ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Dispose(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | ScrollItem gen_to_be_invoked = (ScrollItem)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.Dispose( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_OpeningShow(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | ScrollItem gen_to_be_invoked = (ScrollItem)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.OpeningShow( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_LuaDisplay(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | ScrollItem gen_to_be_invoked = (ScrollItem)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _index = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | gen_to_be_invoked.LuaDisplay( _index ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_LuaDispose(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | ScrollItem gen_to_be_invoked = (ScrollItem)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.LuaDispose( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_LuaRegister(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | ScrollItem gen_to_be_invoked = (ScrollItem)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | System.Action<int> _displayCallBack = translator.GetDelegate<System.Action<int>>(L, 2); |
| | | System.Action _disposeCallBack = translator.GetDelegate<System.Action>(L, 3); |
| | | |
| | | gen_to_be_invoked.LuaRegister( _displayCallBack, _disposeCallBack ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_rectTransform(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | ScrollItem gen_to_be_invoked = (ScrollItem)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.rectTransform); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 0219a9481b354cc4ebce1172d0060e7e |
| | | timeCreated: 1562297211 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | translator.DelayWrapLoader(typeof(WorldMapSkip), WorldMapSkipWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(CyclicScroll), CyclicScrollWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.FuncOpen), SnxxzUIFuncOpenWrap.__Register); |
| | | |
| | | |
| | |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.ItemBehaviour), SnxxzUIItemBehaviourWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(ScrollItem), ScrollItemWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(TimeDownMgr), TimeDownMgrWrap.__Register); |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(TeamInviteType), TeamInviteTypeWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit11(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(TeammatePrepareState), TeammatePrepareStateWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(VipPrivilegeType), VipPrivilegeTypeWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit11(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(E_AttackMode), E_AttackModeWrap.__Register); |
| | | |
| | |
| | | translator.DelayWrapLoader(typeof(MaterialUtility), MaterialUtilityWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(MathUtility), MathUtilityWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(OperationLogCollect), OperationLogCollectWrap.__Register); |
| | | |
| | | |
| | |
| | | <type fullname="JumpUIType" preserve="all"/> |
| | | <type fullname="Snxxz.UI.MapModel" preserve="all"/> |
| | | <type fullname="WorldMapSkip" preserve="all"/> |
| | | <type fullname="CyclicScroll" preserve="all"/> |
| | | <type fullname="Snxxz.UI.FuncOpen" preserve="all"/> |
| | | <type fullname="Snxxz.UI.FunctionButton" preserve="all"/> |
| | | <type fullname="Snxxz.UI.ItemBehaviour" preserve="all"/> |
| | | <type fullname="ScrollItem" preserve="all"/> |
| | | <type fullname="TimeDownMgr" preserve="all"/> |
| | | <type fullname="Snxxz.UI.UI3DModelExhibition" preserve="all"/> |
| | | <type fullname="UIDragDropBehaviour" preserve="all"/> |
| | |
| | | <type fullname="LanguageVerify" preserve="all"/> |
| | | <type fullname="LayerUtility" preserve="all"/> |
| | | <type fullname="MaterialUtility" preserve="all"/> |
| | | <type fullname="MathUtility" preserve="all"/> |
| | | <type fullname="OperationLogCollect" preserve="all"/> |
| | | <type fullname="RunTimeExceptionUtility" preserve="all"/> |
| | | <type fullname="TimeUtility" preserve="all"/> |
| | |
| | | meta.Dispose(); |
| | | |
| | | table.Set("transform", this.transform); |
| | | LuaUtility.DoString(fileName, "LuaBehaviour", table); |
| | | LuaUtility.DoString(fileName, fileName, table); |
| | | |
| | | var luaAwake = table.Get<Action>("Awake"); |
| | | table.Get("OnEnable", out luaOnEnable); |
| | |
| | | });
|
| | | }
|
| | |
|
| | | awardItems.Sort((x, y) =>
|
| | | {
|
| | | var config_x = ItemConfig.Get(x.id);
|
| | | var config_y = ItemConfig.Get(y.id);
|
| | | if (config_x.ItemColor != config_y.ItemColor)
|
| | | {
|
| | | return -config_x.ItemColor.CompareTo(config_y.ItemColor);
|
| | | }
|
| | | return 0;
|
| | | });
|
| | | awardItems.Reverse();
|
| | | //awardItems.Sort((x, y) =>
|
| | | //{
|
| | | // var config_x = ItemConfig.Get(x.id);
|
| | | // var config_y = ItemConfig.Get(y.id);
|
| | | // if (config_x.ItemColor != config_y.ItemColor)
|
| | | // {
|
| | | // return -config_x.ItemColor.CompareTo(config_y.ItemColor);
|
| | | // }
|
| | | // return 0;
|
| | | //});
|
| | |
|
| | | if (rankAwardConfig.Rank > fairyLeagueRankAwardMaxRank)
|
| | | {
|
| | |
| | | [SerializeField] Button m_Goto;
|
| | | [SerializeField] RawImage[] m_RawWeapons;
|
| | | [SerializeField, Header("武器角度,职业1,2,3")] Vector3[] m_WeaponAngles;
|
| | | [SerializeField] float[] m_WeaponScales;
|
| | |
|
| | | FairyLeagueModel model { get { return ModelCenter.Instance.GetModel<FairyLeagueModel>(); } }
|
| | | #region Built-in
|
| | |
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | var _rawImage = m_RawWeapons[0];
|
| | | var _angle = m_WeaponAngles[0];
|
| | | var _scale = m_WeaponScales[0];
|
| | | var _weaponId = model.leagueNoticeWeapons.ContainsKey(job) ? model.leagueNoticeWeapons[job] : 0;
|
| | | if (_weaponId == 0)
|
| | | {
|
| | |
| | | {
|
| | | _rawImage = m_RawWeapons[i];
|
| | | _angle = m_WeaponAngles[i];
|
| | | _scale = m_WeaponScales[i];
|
| | | }
|
| | | }
|
| | |
|
| | | var config = ItemConfig.Get(_weaponId);
|
| | | UI3DModelExhibition.Instance.ShowEquipment(config.ChangeOrd, _angle, 1f, _rawImage);
|
| | | var spiritConfig = SpiritWeaponConfig.Get(_weaponId);
|
| | |
|
| | | UI3DModelExhibition.Instance.ShowEquipment(config.ChangeOrd, spiritConfig != null ? spiritConfig.Rotation : _angle,
|
| | | _scale, _rawImage);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | [SerializeField] TipEquipBaseInfoWidget m_BaseInfoWidget; |
| | | [SerializeField] TipBasePropertyWidget m_BasePropertyWidget; |
| | | [SerializeField] TipSpiritWeaponPropertyWidget m_SpiritWeaponPropertyWidget; |
| | | [SerializeField] TipAuctionTipWidget m_AuctionTipWidget; |
| | | [SerializeField] TipItemDescriptionWidget m_DescriptionWidget; |
| | | [SerializeField] TipBuyItemWidget m_BuyItemWidget; |
| | | [SerializeField] TipGetWayEntranceWidget m_GetWayEntranceWidget; |
| | |
| | | DisplayBaseInfo(); |
| | | DisplayBaseProperty(); |
| | | DisplaySpiritWeaponProperty(); |
| | | DisplayAuction(); |
| | | DisplayItemDescription(); |
| | | DisplayBuyItem(); |
| | | DisplayJobAndPlace(); |
| | |
| | | private void DisplaySpiritWeaponProperty() |
| | | { |
| | | var property = ItemTipUtility.mainTipData.spiritWeaponProperty; |
| | | if (property.properties!=null) |
| | | if (property.properties != null) |
| | | { |
| | | m_SpiritWeaponPropertyWidget.gameObject.SetActive(true); |
| | | m_SpiritWeaponPropertyWidget.Display(property); |
| | |
| | | } |
| | | } |
| | | |
| | | private void DisplayAuction() |
| | | { |
| | | var baseInfo = ItemTipUtility.mainTipData.baseInfo; |
| | | m_AuctionTipWidget.gameObject.SetActive(baseInfo.isAuction); |
| | | if (baseInfo.isAuction) |
| | | { |
| | | var overdueTime = DateTime.Now.AddSeconds((double)baseInfo.auctionSurplusTime); |
| | | m_AuctionTipWidget.Display(overdueTime); |
| | | } |
| | | } |
| | | |
| | | private void DisplayItemDescription() |
| | | { |
| | | var itemId = ItemTipUtility.mainTipData.baseInfo.itemId; |
| | |
| | | continue;
|
| | | }
|
| | |
|
| | | if (key == "UpgradeWin")
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | if (WindowCenter.Instance.IsOpen(key) && key != "NewBieWin")
|
| | | {
|
| | | if (!openWindows.ContainsKey(jumpPhase))
|
| | |
| | | using System;
|
| | |
|
| | | [DisallowMultipleComponent]
|
| | | [XLua.LuaCallCSharp]
|
| | | public class CyclicScroll : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler
|
| | | {
|
| | | [SerializeField] RectTransform m_Content;
|
| | |
| | |
|
| | | protected int hostIndex {
|
| | | get; set;
|
| | | }
|
| | |
|
| | | public void LuaInit(int[] indexs, bool stepByStep)
|
| | | {
|
| | | Init(new List<int>(indexs), stepByStep);
|
| | | }
|
| | |
|
| | | public virtual void Init<T>(List<T> _datas, bool _stepByStep = false)
|
| | |
| | | hostIndex++;
|
| | | preIndex++;
|
| | | item.Dispose();
|
| | | item.LuaDispose();
|
| | | item.Display(datas[hostIndex]);
|
| | | item.LuaDisplay(hostIndex);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | hostIndex--;
|
| | | preIndex--;
|
| | | item.Dispose();
|
| | | item.LuaDispose();
|
| | | item.Display(datas[preIndex]);
|
| | | item.LuaDisplay(preIndex);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | {
|
| | | item.gameObject.SetActive(true);
|
| | | item.Display(datas[preIndex + i]);
|
| | | item.LuaDisplay(preIndex + i);
|
| | | }
|
| | | else
|
| | | {
|
| | | item.gameObject.SetActive(false);
|
| | | item.Dispose();
|
| | | item.LuaDispose();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | using UnityEngine.UI;
|
| | | using System;
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class ScrollItem : MonoBehaviour
|
| | | {
|
| | |
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public void LuaDisplay(int index)
|
| | | {
|
| | | if (luaDisplay != null)
|
| | | {
|
| | | luaDisplay(index);
|
| | | }
|
| | | }
|
| | |
|
| | | public void LuaDispose()
|
| | | {
|
| | | if (luaDispose != null)
|
| | | {
|
| | | luaDispose();
|
| | | }
|
| | | }
|
| | |
|
| | | Action<int> luaDisplay;
|
| | | Action luaDispose;
|
| | | public void LuaRegister(Action<int> displayCallBack, Action disposeCallBack)
|
| | | {
|
| | | luaDisplay = displayCallBack;
|
| | | luaDispose = disposeCallBack;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | secondaryId = apperance.secondary,
|
| | | wingsId = apperance.wings,
|
| | | suitLevel = apperance.isSuit ? 1 : 0,
|
| | | reikiRootEffectId = (int)reikiRootEffectId,
|
| | | reikiRootEffectId = isDialogue ? 0 : reikiRootEffectId,
|
| | | isDialogue = isDialogue,
|
| | | };
|
| | |
|
| | |
| | | HideWeaponEffect();
|
| | | HideSecondaryEffect();
|
| | | HideSuitEffect();
|
| | | HideReikiRootEffect();
|
| | |
|
| | | if (weaponId != 0)
|
| | | {
|
| | |
| | | {
|
| | | if (reikiRootEffect != null)
|
| | | {
|
| | | reikiRootEffect.transform.localPosition = Vector3.zero;
|
| | | reikiRootEffect.transform.localScale = Vector3.one;
|
| | | SFXPlayUtility.Instance.Release(reikiRootEffect);
|
| | | reikiRootEffect = null;
|
| | | }
|
| | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | [XLua.LuaCallCSharp] |
| | | public class MathUtility |
| | | { |
| | | |