Merge branch 'master' into Equip
7 文件已复制
1个文件已删除
1 文件已重命名
8个文件已添加
25个文件已修改
| | |
| | | Register(typeof(HA31D_tagMCGodWeaponLVList), typeof(DTCA31D_tagMCGodWeaponLVList));
|
| | | Register(typeof(H03F0_tagPyFakePack), typeof(DTC03F0_tagPyFakePack));
|
| | | Register(typeof(H1801_tagGameServerGeneralPack), typeof(DTC1801_tagGameServerGeneralPack));
|
| | | Register(typeof(HA3B3_tagMCEquipPartStarLVInfo), typeof(DTCA3B3_tagMCEquipPartStarLVInfo));
|
| | | //Register(typeof(HA3B3_tagMCEquipPartStarLVInfo), typeof(DTCA3B3_tagMCEquipPartStarLVInfo));
|
| | | Register(typeof(H0310_tagRoleSkillChange), typeof(DTC0310_tagRoleSkillChange));
|
| | | Register(typeof(H0721_tagMakeItemAnswer), typeof(DTC0721_tagMakeItemAnswer));
|
| | | Register(typeof(HA9A1_tagGCQueryCompensationResult), typeof(DTCA9A1_tagGCQueryCompensationResult));
|
| | |
| | | Register(typeof(HB509_tagGCClearAuctionItemInfo), typeof(DTCB509_tagGCClearAuctionItemInfo));
|
| | | Register(typeof(HB510_tagGCBiddingItemInfo), typeof(DTCB510_tagGCBiddingItemInfo));
|
| | | #endregion
|
| | |
|
| | | Register(typeof(HA3B3_tagMCEquipPartPlusInfo), typeof(DTCA3B3_tagMCEquipPartPlusInfo));//装备强化
|
| | | }
|
| | |
|
| | | private static void Register(Type _pack, Type _business)
|
| | |
| | | High = 2,
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 采集
|
| | | public float CollectTime { get; private set; }
|
| | | public static event Action<H0812_tagBeginPrepare> OnPlayerCollect;
|
| | | public static event Action<int, byte> OnPlayerCollectEnd;
|
| | | public void OnRefreshData(H0812_tagBeginPrepare vNetData)
|
| | | {
|
| | | CollectTime = vNetData.MaxTime;
|
| | | if (OnPlayerCollect != null)
|
| | | OnPlayerCollect(vNetData);
|
| | | if (vNetData.PlayerID == PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|
| | | WindowCenter.Instance.Open<RealmCollectWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | public void OnRefreshData(H0813_tagPrepareEnd vNetData)
|
| | | {
|
| | | if (OnPlayerCollectEnd != null)
|
| | | OnPlayerCollectEnd((int)vNetData.PlayerID, vNetData.Type);
|
| | | }
|
| | | #endregion
|
| | | }
|
| | |
|
| | | public class RealmHoldData
|
| | |
| | | {
|
| | | }
|
| | |
|
| | | #region 玩家是否在打坐状态
|
| | | public bool IsInJumpToDaZuo = false;
|
| | | public Dictionary<uint, byte> playerSitDic = new Dictionary<uint, byte>();
|
| | | public void OnRefreshData(H0411_tagPlayerSit vNetData)
|
| | | {
|
| | | if (playerSitDic.ContainsKey(vNetData.PlayerID))
|
| | | {
|
| | | playerSitDic[vNetData.PlayerID] = vNetData.Type;
|
| | | }
|
| | | else
|
| | | {
|
| | | playerSitDic.Add(vNetData.PlayerID, vNetData.Type);
|
| | | }
|
| | | GActorPlayerBase player = GAMgr.Instance.GetBySID(vNetData.PlayerID) as GActorPlayerBase;
|
| | | if (player != null)
|
| | | {
|
| | | if (vNetData.Type == 0)
|
| | | {
|
| | | GA_Player _otherPlayer = player as GA_Player;
|
| | | if (_otherPlayer != null)
|
| | | {
|
| | | _otherPlayer.StopMoveToPosition();
|
| | | }
|
| | | player.Dazuo();
|
| | | }
|
| | | else if (vNetData.Type == 1)
|
| | | {
|
| | | player.IdleImmediate();
|
| | | }
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 配置
|
| | | public const int REALM_DUNGEON_ID = 31110;
|
| | | public int realmHoleLimit { get; private set; }
|
| | |
| | | MainRedDot.Instance.Register();
|
| | | SettingEffectMgr.Instance.Begin();
|
| | | QuickSetting.Instance.SetQuickSetting(package.Setting);
|
| | | ClientSceneManager.Instance.ReConnectClear();
|
| | |
|
| | | // 初始化摄像机
|
| | | if (!CameraController.Instance)
|
| | |
| | |
|
| | | public class DTC0411_tagPlayerSit : DtcBasic
|
| | | {
|
| | | RealmModel m_RealmModel;
|
| | | RealmModel realmModel
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_RealmModel ?? (m_RealmModel = ModelCenter.Instance.GetModel<RealmModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | FairyFeastModel fairyFeastModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<FairyFeastModel>(); }
|
| | |
| | |
|
| | | if (vNetData != null)
|
| | | {
|
| | | realmModel.OnRefreshData(vNetData);
|
| | | PlayerSitHandler.Instance.ReceivePackage(vNetData);
|
| | | fairyFeastModel.UpdateTransmitState(vNetData);
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | if (vNetData.Reason == 0)
|
| | | {
|
| | | if (!model.playerSitDic.ContainsKey(vNetData.ObjID)
|
| | | || model.playerSitDic[vNetData.ObjID] == 1)
|
| | | if (!PlayerSitHandler.Instance.playerSitDict.ContainsKey(vNetData.ObjID)
|
| | | || PlayerSitHandler.Instance.playerSitDict[vNetData.ObjID] == 1)
|
| | | {
|
| | | _actor.IdleImmediate();
|
| | | _actor.StopPathFind();
|
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // A3 B3 装备部位强化信息 #tagMCEquipPartPlusInfo
|
| | |
|
| | | public class DTCA3B3_tagMCEquipPartPlusInfo : DtcBasic {
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | HA3B3_tagMCEquipPartPlusInfo vNetData = vNetPack as HA3B3_tagMCEquipPartPlusInfo;
|
| | | }
|
| | | }
|
copy from System/Realm/RealmCollectWin.cs.meta
copy to Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA3B3_tagMCEquipPartPlusInfo.cs.meta
| File was copied from System/Realm/RealmCollectWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 750c734c2d7b6fc4c85368c8bbf4d499 |
| | | timeCreated: 1507974546 |
| | | licenseType: Free |
| | | guid: bff935cf1b66fde498ac756ba6072d8f |
| | | timeCreated: 1552289936 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // A3 B3 装备部位强化信息 #tagMCEquipPartPlusInfo
|
| | |
|
| | | public class HA3B3_tagMCEquipPartPlusInfo : GameNetPackBasic {
|
| | | public byte Count; // 信息个数
|
| | | public tagMCEquipPartPlusLV[] InfoList; // 信息列表
|
| | |
|
| | | public HA3B3_tagMCEquipPartPlusInfo () {
|
| | | _cmd = (ushort)0xA3B3;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out Count, vBytes, NetDataType.BYTE);
|
| | | InfoList = new tagMCEquipPartPlusLV[Count];
|
| | | for (int i = 0; i < Count; i ++) {
|
| | | InfoList[i] = new tagMCEquipPartPlusLV();
|
| | | TransBytes (out InfoList[i].PackType, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out InfoList[i].EquipIndex, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out InfoList[i].EquipPartStarLV, vBytes, NetDataType.WORD);
|
| | | TransBytes (out InfoList[i].Proficiency, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out InfoList[i].EvolveLV, vBytes, NetDataType.BYTE);
|
| | | }
|
| | | }
|
| | |
|
| | | public struct tagMCEquipPartPlusLV {
|
| | | public byte PackType;
|
| | | public byte EquipIndex;
|
| | | public ushort EquipPartStarLV;
|
| | | public uint Proficiency;
|
| | | public byte EvolveLV;
|
| | | }
|
| | |
|
| | | }
|
copy from System/Realm/RealmCollectWin.cs.meta
copy to Core/NetworkPackage/ServerPack/HA3_Function/HA3B3_tagMCEquipPartPlusInfo.cs.meta
| File was copied from System/Realm/RealmCollectWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 750c734c2d7b6fc4c85368c8bbf4d499 |
| | | timeCreated: 1507974546 |
| | | licenseType: Free |
| | | guid: c11b073518011a54792e912e28ae7dea |
| | | timeCreated: 1552289936 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | |
| | | break; |
| | | case E_PrepareType.pstCollecting: |
| | | |
| | | PlayerDatas.Instance.realm.OnRefreshData(H0812); |
| | | if (H0812.PlayerID == PlayerDatas.Instance.PlayerId)
|
| | | {
|
| | | NormalCollectWin.s_CollectInfo = new ClientH0812()
|
| | | {
|
| | | PlayerID = PlayerDatas.Instance.PlayerId,
|
| | | PrepareState = (byte)E_PrepareType.pstMissionCollecting,
|
| | | MaxTime = H0812.MaxTime,
|
| | | PrepareID = (int)H0812.PrepareID,
|
| | | };
|
| | | WindowCenter.Instance.Open<NormalCollectWin>();
|
| | | } |
| | | |
| | | _player = GAMgr.Instance.GetBySID(H0812.PlayerID) as GActorPlayerBase; |
| | | if (_player != null) |
| | |
| | | break; |
| | | case E_PrepareType.pstMissionCollecting: |
| | | |
| | | PlayerDatas.Instance.realm.OnRefreshData(H0812); |
| | | if (H0812.PlayerID == PlayerDatas.Instance.PlayerId)
|
| | | {
|
| | | NormalCollectWin.s_CollectInfo = new ClientH0812()
|
| | | {
|
| | | PlayerID = PlayerDatas.Instance.PlayerId,
|
| | | PrepareState = (byte)E_PrepareType.pstMissionCollecting,
|
| | | MaxTime = H0812.MaxTime,
|
| | | PrepareID = (int)H0812.PrepareID,
|
| | | };
|
| | | WindowCenter.Instance.Open<NormalCollectWin>();
|
| | | } |
| | | |
| | | _player = GAMgr.Instance.GetBySID(H0812.PlayerID) as GActorPlayerBase; |
| | | if (_player != null) |
| | |
| | | } |
| | | |
| | | public UnityEngine.Events.UnityAction OnPrepareEndSuccess; |
| | | public UnityEngine.Events.UnityAction<int, int> OnPrepareEnd; |
| | | |
| | | public void ServerPrepareEnd(H0813_tagPrepareEnd h0813) |
| | | { |
| | |
| | | } |
| | | |
| | | WindowCenter.Instance.Close<PrepareWin>(); |
| | | PlayerDatas.Instance.realm.OnRefreshData(h0813); |
| | | |
| | | if (h0813.PlayerID == PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|
| | | WindowCenter.Instance.Close<NormalCollectWin>();
|
| | | } |
| | | |
| | | GActorPlayerBase _player = null; |
| | | |
| | |
| | | //Debug.LogFormat("收到进度条结束异常情况: {0}", (E_PrepareType)h0813.Type); |
| | | } |
| | | |
| | | if (OnPrepareEnd != null)
|
| | | {
|
| | | OnPrepareEnd((int)h0813.PlayerID, h0813.Type);
|
| | | } |
| | | |
| | | H0812 = null; |
| | | } |
| | |
| | | private Dictionary<int, IEventHandler> m_EventHandlerDict = new Dictionary<int, IEventHandler>(); |
| | | private List<IEventHandler> m_ReadyRemoveEventHandlerList = new List<IEventHandler>(); |
| | | private Dictionary<int, uint> m_TriggerIDToMissionIDDict = new Dictionary<int, uint>(); |
| | | private Dictionary<int, TriggerHandler> m_TriggerHandlerDict = new Dictionary<int, TriggerHandler>(); |
| | | private List<int> m_ReadyRemoveTriggerList = new List<int>(); |
| | | private Dictionary<int, List<GActorNpcFight>> m_EventActorDict = new Dictionary<int, List<GActorNpcFight>>(); |
| | | |
| | |
| | | m_TransferGroupList.Add(new TransferGroup(_trasfer)); |
| | | } |
| | | |
| | | TriggerHandler.OnEnter += OnTriggerEnter; |
| | | TriggerHandler.OnExit += OnTriggerExit; |
| | | } |
| | | |
| | | public void UnInit() |
| | |
| | | } |
| | | m_TransferGroupList.Clear(); |
| | | |
| | | ReConnectClear(); |
| | | |
| | | TriggerHandler.OnEnter -= OnTriggerEnter; |
| | | TriggerHandler.OnExit -= OnTriggerExit; |
| | | |
| | | m_Inited = false; |
| | | } |
| | | |
| | | public void ReConnectClear() |
| | | { |
| | | foreach (var _triggerID in m_TriggerIDToMissionIDDict.Keys) |
| | | { |
| | | DelayUnTrigger(_triggerID); |
| | | } |
| | | |
| | | m_Inited = false; |
| | | m_TriggerIDToMissionIDDict.Clear(); |
| | | m_TriggerHandlerDict.Clear(); |
| | | } |
| | | |
| | | public void Update() |
| | |
| | | foreach (var _trasfer in m_TransferGroupList) |
| | | { |
| | | _trasfer.Update(); |
| | | } |
| | | |
| | | foreach (var _triggerHandler in m_TriggerHandlerDict.Values) |
| | | { |
| | | _triggerHandler.Update(); |
| | | } |
| | | |
| | | m_ReadyRemoveEventHandlerList.Clear(); |
| | |
| | | |
| | | private IEnumerator DelayTrigger(uint missionID, int triggerID) |
| | | { |
| | | // ID为0, 约定为清空触发 |
| | | if (triggerID == 0) |
| | | { |
| | | yield return SnxxzGame.Instance.StartCoroutine(DelayUnTrigger(triggerID)); |
| | |
| | | continue; |
| | | } |
| | | |
| | | var _triggerHandler = new TriggerHandler(_trigger); |
| | | m_TriggerHandlerDict[_trigger.id] = _triggerHandler; |
| | | foreach (var _eventID in _trigger.evevntIDs) |
| | | { |
| | | if (!m_MapData.eventDict.ContainsKey(_eventID)) |
| | |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void OnTriggerEnter(int id) |
| | | { |
| | | Debug.Log("进入了触发器范围: " + id); |
| | | } |
| | | |
| | | private void OnTriggerExit(int id) |
| | | { |
| | | if (m_TriggerHandlerDict.ContainsKey(id)) |
| | | { |
| | | Debug.Log("退出了触发器范围: " + id); |
| | | CA225_tagCMClientTaskCount _a225 = new CA225_tagCMClientTaskCount |
| | | { |
| | | CountID = 10000 |
| | | }; |
| | | GameNetSystem.Instance.SendInfo(_a225); |
| | | } |
| | | } |
| | | } |
| | |
| | | m_Step = 1; |
| | | m_InCreaseTime = 0; |
| | | m_FlyingEffect = SFXPlayUtility.Instance.PlayBattleEffect(1180, _hero); |
| | | SFXPlayUtility.Instance.PlayBattleEffect(1181, _p.position, Vector3.forward); |
| | | _hero.Idle(); |
| | | _hero.SwitchHeadNameBindNode(true); |
| | | } |
| | |
| | | using H2Engine; |
| | | using UnityEngine; |
| | | using UnityEngine.Events; |
| | | |
| | | public class TriggerHandler |
| | | { |
| | | private MapTrigger m_Trigger; |
| | | |
| | | public static UnityAction<int> OnEnter; |
| | | public static UnityAction<int> OnExit; |
| | | |
| | | private bool m_InOrOut; |
| | | |
| | | public TriggerHandler(MapTrigger trigger) |
| | | { |
| | | m_Trigger = trigger; |
| | | } |
| | | |
| | | public void Update() |
| | | { |
| | | var _hero = PlayerDatas.Instance.hero; |
| | | if (_hero == null) |
| | | { |
| | | return; |
| | | } |
| | | if (m_InOrOut) |
| | | { |
| | | if (_hero.Pos.x < m_Trigger.position.x - m_Trigger.size.x * .5f |
| | | || _hero.Pos.x > m_Trigger.position.x + m_Trigger.size.x * .5f |
| | | || _hero.Pos.z < m_Trigger.position.z - m_Trigger.size.z * .5f |
| | | || _hero.Pos.z > m_Trigger.position.z + m_Trigger.size.z * .5f) |
| | | { |
| | | m_InOrOut = false; |
| | | if (OnExit != null) |
| | | { |
| | | OnExit(m_Trigger.id); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (_hero.Pos.x > m_Trigger.position.x - m_Trigger.size.x * .5f |
| | | && _hero.Pos.x < m_Trigger.position.x + m_Trigger.size.x * .5f |
| | | && _hero.Pos.z > m_Trigger.position.z - m_Trigger.size.z * .5f |
| | | && _hero.Pos.z < m_Trigger.position.z + m_Trigger.size.z * .5f) |
| | | { |
| | | m_InOrOut = true; |
| | | if (OnEnter != null) |
| | | { |
| | | OnEnter(m_Trigger.id); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnRefreshData", _m_OnRefreshData); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetRealmHelperAttr", _m_GetRealmHelperAttr); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsBigRealm", _m_IsBigRealm); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetRealmStage", _m_TryGetRealmStage); |
| | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "realmSuppressHurt", _g_get_realmSuppressHurt); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsRealmHighest", _g_get_IsRealmHighest); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsDungeonState", _g_get_IsDungeonState); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsInJumpToDaZuo", _g_get_IsInJumpToDaZuo); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "playerSitDic", _g_get_playerSitDic); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "realmRedpoint", _g_get_realmRedpoint); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "openedRealmUpWin", _g_get_openedRealmUpWin); |
| | | |
| | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "openByDungeonStep", _s_set_openByDungeonStep); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "leaderId", _s_set_leaderId); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "realmDungeonState", _s_set_realmDungeonState); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsInJumpToDaZuo", _s_set_IsInJumpToDaZuo); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "playerSitDic", _s_set_playerSitDic); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "realmRedpoint", _s_set_realmRedpoint); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "openedRealmUpWin", _s_set_openedRealmUpWin); |
| | | |
| | |
| | | { |
| | | |
| | | 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_OnRefreshData(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.RealmModel gen_to_be_invoked = (Snxxz.UI.RealmModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | H0411_tagPlayerSit _vNetData = (H0411_tagPlayerSit)translator.GetObject(L, 2, typeof(H0411_tagPlayerSit)); |
| | | |
| | | gen_to_be_invoked.OnRefreshData( _vNetData ); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_IsInJumpToDaZuo(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.RealmModel gen_to_be_invoked = (Snxxz.UI.RealmModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsInJumpToDaZuo); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_playerSitDic(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.RealmModel gen_to_be_invoked = (Snxxz.UI.RealmModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.playerSitDic); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_realmRedpoint(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | |
| | | Snxxz.UI.RealmModel gen_to_be_invoked = (Snxxz.UI.RealmModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.realmDungeonState = LuaAPI.lua_toboolean(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_IsInJumpToDaZuo(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.RealmModel gen_to_be_invoked = (Snxxz.UI.RealmModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.IsInJumpToDaZuo = LuaAPI.lua_toboolean(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_playerSitDic(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.RealmModel gen_to_be_invoked = (Snxxz.UI.RealmModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.playerSitDic = (System.Collections.Generic.Dictionary<uint, byte>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<uint, byte>)); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | |
| | | case DailyQuestType.CrossServerPk:
|
| | | WindowCenter.Instance.Open<CrossServerWin>();
|
| | | break;
|
| | | case DailyQuestType.AllianceBoss1:
|
| | | dungeonModel.currentDungeon = new Dungeon(AllianceBossModel.DATAMAPID, 0);
|
| | | AllianceBossEntranceWin.dailyQuestId = (int)DailyQuestType.AllianceBoss1;
|
| | | WindowCenter.Instance.Open<AllianceBossEntranceWin>();
|
| | | break;
|
| | | case DailyQuestType.AllianceBoss2:
|
| | | dungeonModel.currentDungeon = new Dungeon(AllianceBossModel.DATAMAPID, 1);
|
| | | AllianceBossEntranceWin.dailyQuestId = (int)DailyQuestType.AllianceBoss2;
|
| | | WindowCenter.Instance.Open<AllianceBossEntranceWin>();
|
| | | break;
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | }
|
| | | m_PriceButton.SetListener(() => //一口价
|
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + auctionItem.BuyoutPrice + "立即拍下商品?";
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond; |
| | | string str = Language.Get("PMH_02", auctionItem.BuyoutPrice);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (isOk)
|
| | | {
|
| | |
| | | m_BiddingButton.SetListener(() => //竞价
|
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + needJade + "参与竞价?";
|
| | | string str = Language.Get("PMH_01", needJade);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (isOk)
|
| | | {
|
| | |
| | | m_BiddingButton.interactable = false;
|
| | | m_BiddingImage.gray = true;
|
| | | }
|
| | | int seconds = AuctionItem.NoticeSaleMinutes * 60 - (int)timeSpan.TotalSeconds;
|
| | | m_TimeText.text = TimeUtility.SecondsToHMS(seconds) + "后开始";
|
| | | int seconds = AuctionItem.NoticeSaleMinutes * 60 - (int)timeSpan.TotalSeconds; |
| | | m_TimeText.text = Language.Get("PMH_03", TimeUtility.SecondsToHMS(seconds));
|
| | | }
|
| | | else if (minute >= AuctionItem.NoticeSaleMinutes && minute <= AuctionItem.FamilySaleMinutes)//拍卖中
|
| | | {
|
| | |
| | | m_BiddingImage.gray = false;
|
| | | }
|
| | | int seconds = AuctionItem.FamilySaleMinutes * 60 - ((int)timeSpan.TotalSeconds - AuctionItem.NoticeSaleMinutes * 60);
|
| | | m_TimeText.text = "剩余" + TimeUtility.SecondsToHMS(seconds);
|
| | | m_TimeText.text = Language.Get("PMH_04", TimeUtility.SecondsToHMS(seconds));
|
| | | }
|
| | | }
|
| | | } |
| | |
| | | m_PriceButton.SetListener(() => //一口价
|
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + auctionItem.BuyoutPrice + "立即拍下商品?";
|
| | | string str = Language.Get("PMH_02", auctionItem.BuyoutPrice);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (isOk)
|
| | | {
|
| | |
| | | m_BiddingButton.SetListener(() => //竞价
|
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + needJade + "参与竞价?";
|
| | | string str = Language.Get("PMH_01", needJade);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (isOk)
|
| | | {
|
| | |
| | | });
|
| | | });
|
| | | }
|
| | | //public override void Refresh(CellView cell)
|
| | | //{
|
| | | // m_NeedImage.SetActive(false);
|
| | | // m_ParticipateImage.SetActive(false);
|
| | | // m_BiddingTextObj.SetActive(false);
|
| | | // m_HighestPriceImage.SetActive(false);
|
| | | // m_EquipmentScoreObj.SetActive(false);
|
| | | // var index = cell.index;
|
| | | // if (index >= model.FullServiceAuctionList.Count)
|
| | | // {
|
| | | // DebugEx.LogError("超出数据存储范围");
|
| | | // return;
|
| | | // }
|
| | |
|
| | | // var fullServiceAuction = model.FullServiceAuctionList[index];
|
| | | // if (index == 1)
|
| | | // {
|
| | | // var sendNumber = AuctionInquiry.Instance.GetSendNumber();
|
| | | // if (sendNumber != 0 && auctionHelpModel.Wait && model.QueryRemaining.UpBool)
|
| | | // {
|
| | | // AuctionInquiry.Instance.SendQueryAuction(fullServiceAuction.ItemGUID, sendNumber, 2);
|
| | | // auctionHelpModel.Wait = false;
|
| | | // }
|
| | | // } else if (index== model.FullServiceAuctionList.Count-2)
|
| | | // {
|
| | | // var sendNumber = AuctionInquiry.Instance.GetSendNumber();
|
| | | // if (sendNumber != 0 && auctionHelpModel.Wait && model.QueryRemaining.DownBool)
|
| | | // {
|
| | | // AuctionInquiry.Instance.SendQueryAuction(fullServiceAuction.ItemGUID, sendNumber, 1);
|
| | | // auctionHelpModel.Wait = false;
|
| | | // }
|
| | | // }
|
| | | // FullServiceAuction = fullServiceAuction;
|
| | | // var playerId = PlayerDatas.Instance.baseData.PlayerID;
|
| | | // var auctionItem = AuctionItemConfig.Get(fullServiceAuction.ItemID); |
| | | // var itemConfig = ItemConfig.Get(fullServiceAuction.ItemID);
|
| | | // if (itemConfig == null)
|
| | | // {
|
| | | // DebugEx.LogError("物品表没有找到该物品,物品ID为" + fullServiceAuction.ItemID);
|
| | | // return;
|
| | | // }
|
| | | // if (auctionItem == null)
|
| | | // {
|
| | | // DebugEx.LogError("拍卖物品表没有找到该物品,物品ID为"+ fullServiceAuction.ItemID);
|
| | | // return;
|
| | | // }
|
| | | // AuctionItem = auctionItem;
|
| | | // if (model.BiddingItemInfoDic.ContainsKey(fullServiceAuction.ItemGUID))//参与了竞价的物品
|
| | | // {
|
| | | // var biddingItemInfo = model.BiddingItemInfoDic[fullServiceAuction.ItemGUID];
|
| | | // m_ParticipateImage.SetActive(true);
|
| | | // if (biddingItemInfo.BidderID == playerId)//判断是否最高竞价
|
| | | // {
|
| | | // m_HighestPriceImage.SetActive(true);
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // m_BiddingTextObj.SetActive(true);
|
| | | // }
|
| | | // }
|
| | | // ItemCellModel cellModel = new ItemCellModel(fullServiceAuction.ItemID, true, |
| | | // (ulong)fullServiceAuction.ItemCount, itemConfig.BindType);
|
| | | // m_ItemCell.Init(cellModel);
|
| | | // m_ItemName.text = itemConfig.ItemName;
|
| | | // if (itemConfig.EquipPlace != 0)
|
| | | // {
|
| | | // m_EquipmentScoreObj.SetActive(true);
|
| | | // // m_Score.text
|
| | | // }
|
| | | // int needJade = 0;
|
| | | // if (fullServiceAuction.BidderPrice == 0)
|
| | | // {
|
| | | // needJade = auctionItem.BasePrice;
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // needJade = fullServiceAuction.BidderPrice + auctionItem.BiddingAdd;
|
| | | // }
|
| | | // m_JadeNumber.text = needJade.ToString();
|
| | | // m_JadeNumber1.text = auctionItem.BuyoutPrice.ToString();
|
| | | // m_PriceButton.SetListener(()=> //一口价
|
| | | // {
|
| | | // int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | // string str = "是否花费" + auctionItem.BuyoutPrice + "立即拍下商品?";
|
| | | // ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | // if (jade >= auctionItem.BuyoutPrice)
|
| | | // {
|
| | | // AuctionInquiry.Instance.SendSellAuctionItem(fullServiceAuction.ItemGUID, auctionItem.BuyoutPrice);
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | // }
|
| | | // });
|
| | | // });
|
| | | // m_JadeNumber2.text = needJade.ToString();
|
| | | // m_BiddingButton.SetListener(()=> //竞价
|
| | | // {
|
| | | // int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | // string str = "是否花费" + needJade + "参与竞价?";
|
| | | // ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | // if (jade >= needJade)
|
| | | // {
|
| | | // AuctionInquiry.Instance.SendSellAuctionItem(fullServiceAuction.ItemGUID, needJade);
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | // }
|
| | | // });
|
| | | // });
|
| | | //}
|
| | | private void LateUpdate()
|
| | | {
|
| | | if (AuctionItem != null && FullServiceAuction != null)
|
| | |
| | | m_BiddingImage.gray = true;
|
| | | }
|
| | | int seconds = AuctionItem.NoticeSaleMinutes * 60 - (int)timeSpan.TotalSeconds;
|
| | | m_TimeText.text = TimeUtility.SecondsToHMS(seconds) + "后开始";
|
| | | m_TimeText.text = Language.Get("PMH_03", TimeUtility.SecondsToHMS(seconds));
|
| | | }
|
| | | else if (minute >= AuctionItem.NoticeSaleMinutes && minute <= AuctionItem.FamilySaleMinutes)//拍卖中
|
| | | {
|
| | |
| | | m_BiddingImage.gray = false;
|
| | | }
|
| | | int seconds = AuctionItem.FamilySaleMinutes * 60 - ((int)timeSpan.TotalSeconds - AuctionItem.NoticeSaleMinutes * 60);
|
| | | m_TimeText.text = "剩余" + TimeUtility.SecondsToHMS(seconds);
|
| | | m_TimeText.text = Language.Get("PMH_04", TimeUtility.SecondsToHMS(seconds));
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | m_Income.text = 0.ToString();
|
| | | if (myAuction.BidderPrice == 0)
|
| | | {
|
| | | m_BiddingText.text = "暂无出价";
|
| | | m_BiddingText.text = Language.Get("PMH_05");
|
| | | }
|
| | | else
|
| | | {
|
| | | m_BiddingText.text = "竞价中...";
|
| | | |
| | | if (myAuction.AuctionType == 0)//是否仙盟拍品流拍至全服拍品
|
| | | {
|
| | | m_BiddingText.text = Language.Get("PMH_07");
|
| | | }
|
| | | else
|
| | | {
|
| | | m_BiddingText.text = Language.Get("PMH_06");
|
| | | }
|
| | | if (type == 0)
|
| | | {
|
| | | int auctionTaxrate = Mathf.CeilToInt((float)(auctionHelpModel.
|
| | |
| | | int minute = (int)timeSpan.TotalMinutes;
|
| | | if (minute < AuctionItem.NoticeSaleMinutes)//预热中
|
| | | {
|
| | | int seconds = AuctionItem.NoticeSaleMinutes * 60 - (int)timeSpan.TotalSeconds;
|
| | | m_TimeText.text = TimeUtility.SecondsToHMS(seconds) + "后开始";
|
| | | int seconds = AuctionItem.NoticeSaleMinutes * 60 - (int)timeSpan.TotalSeconds; |
| | | m_TimeText.text = Language.Get("PMH_03", TimeUtility.SecondsToHMS(seconds));
|
| | | }
|
| | | else if (minute >= AuctionItem.NoticeSaleMinutes && minute <= AuctionItem.FamilySaleMinutes)//拍卖中
|
| | | {
|
| | | int seconds = AuctionItem.FamilySaleMinutes * 60 - ((int)timeSpan.TotalSeconds - AuctionItem.NoticeSaleMinutes * 60);
|
| | | m_TimeText.text = "剩余" + TimeUtility.SecondsToHMS(seconds);
|
| | | m_TimeText.text = Language.Get("PMH_04", TimeUtility.SecondsToHMS(seconds));
|
| | | }
|
| | | }
|
| | | } |
| | |
| | | m_JadeNumber1.text = auctionItem.BuyoutPrice.ToString();
|
| | | m_PriceButton.SetListener(() => //一口价
|
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + auctionItem.BuyoutPrice + "立即拍下商品?";
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond; |
| | | string str = Language.Get("PMH_02", auctionItem.BuyoutPrice);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (isOk)
|
| | | {
|
| | |
| | | m_JadeNumber2.text = (needJade).ToString();
|
| | | m_BiddingButton.SetListener(() => //竞价
|
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + needJade + "参与竞价?";
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond; |
| | | string str = Language.Get("PMH_01", needJade);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (isOk)
|
| | | {
|
| | |
| | | m_BiddingButton.interactable = false;
|
| | | m_BiddingImage.gray = true;
|
| | | }
|
| | | int seconds = AuctionItem.NoticeSaleMinutes * 60 - (int)timeSpan.TotalSeconds;
|
| | | m_TimeText.text = TimeUtility.SecondsToHMS(seconds) + "后开始";
|
| | | int seconds = AuctionItem.NoticeSaleMinutes * 60 - (int)timeSpan.TotalSeconds; |
| | | m_TimeText.text = Language.Get("PMH_03", TimeUtility.SecondsToHMS(seconds));
|
| | | }
|
| | | else if (minute >= AuctionItem.NoticeSaleMinutes && minute <= AuctionItem.FamilySaleMinutes)//拍卖中
|
| | | {
|
| | |
| | | m_BiddingImage.gray = false;
|
| | | }
|
| | | int seconds = AuctionItem.FamilySaleMinutes * 60 - ((int)timeSpan.TotalSeconds - AuctionItem.NoticeSaleMinutes * 60);
|
| | | m_TimeText.text = "剩余" + TimeUtility.SecondsToHMS(seconds);
|
| | | m_TimeText.text = Language.Get("PMH_04", TimeUtility.SecondsToHMS(seconds));
|
| | | }
|
| | | }
|
| | | } |
| | |
| | | Text transactionStatusText = cell.transform.Find("TransactionStatusText").GetComponent<Text>();
|
| | | Text timeText = cell.transform.Find("TimeText").GetComponent<Text>();
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, true, (ulong)1, itemConfig.BindType);
|
| | |
|
| | | GameObject SuccessfulBiddingObj = cell.transform.Find("SuccessfulBiddingObj").gameObject;//竞拍成功(竞拍成功)
|
| | | Text SuccessfulBiddingText= cell.transform.Find("SuccessfulBiddingObj/SuccessfulBiddingText").GetComponent<Text>();
|
| | | Text JadeMoney= cell.transform.Find("SuccessfulBiddingObj/JadeMoney").GetComponent<Text>();
|
| | |
|
| | | GameObject AuctionFailedObj = cell.transform.Find("AuctionFailedObj").gameObject;//竞拍失败
|
| | | Text JadeMoney_1 = cell.transform.Find("AuctionFailedObj/JadeMoney").GetComponent<Text>();
|
| | | switch (auctionRecord.RecordResult)
|
| | | {
|
| | | case 0://流拍
|
| | | transactionStatusText.gameObject.SetActive(true);
|
| | | SuccessfulBiddingObj.SetActive(false);
|
| | | AuctionFailedObj.SetActive(false);
|
| | | if (AuctionType == 0)
|
| | | {
|
| | | transactionStatusText.text = Language.Get("PMH_11");
|
| | | }
|
| | | else if (AuctionType==1)
|
| | | {
|
| | | transactionStatusText.text = Language.Get("PMH_12");
|
| | | }
|
| | | break;
|
| | | case 1://拍卖成交(竞拍成功)
|
| | | SuccessfulBiddingObj.SetActive(true);
|
| | | transactionStatusText.gameObject.SetActive(false);
|
| | | AuctionFailedObj.SetActive(false);
|
| | | SuccessfulBiddingText.text = Language.Get("PMH_13");
|
| | | JadeMoney.text = auctionRecord.BidderPrice.ToString();
|
| | | break;
|
| | | case 2://回收
|
| | | transactionStatusText.gameObject.SetActive(true);
|
| | | SuccessfulBiddingObj.SetActive(false);
|
| | | AuctionFailedObj.SetActive(false);
|
| | | transactionStatusText.text = Language.Get("PMH_14");
|
| | | break;
|
| | | case 3://竞价成功
|
| | | SuccessfulBiddingObj.SetActive(true);
|
| | | transactionStatusText.gameObject.SetActive(false);
|
| | | AuctionFailedObj.SetActive(false);
|
| | | SuccessfulBiddingText.text = Language.Get("PMH_15", auctionRecord.BidderName);
|
| | | JadeMoney.text = auctionRecord.BidderPrice.ToString();
|
| | | break;
|
| | | case 4://竞价失败
|
| | | AuctionFailedObj.SetActive(true);
|
| | | SuccessfulBiddingObj.SetActive(false);
|
| | | transactionStatusText.gameObject.SetActive(false);
|
| | | JadeMoney_1.text= auctionRecord.BidderPrice.ToString();
|
| | | break;
|
| | | }
|
| | |
|
| | | itemCell.Init(cellModel);
|
| | | textName.text = itemConfig.ItemName;
|
| | | transactionStatusText.text = GetRecordResultName(auctionRecord.RecordResult);
|
| | | timeText.text = auctionRecord.TimeStr;
|
| | | }
|
| | |
|
| | |
| | | switch (index)
|
| | | {
|
| | | case 0:
|
| | | str = "我的拍品";
|
| | | str = Language.Get("PMH_08");
|
| | | break;
|
| | | case 1:
|
| | | str = "仙盟拍品";
|
| | | str = Language.Get("PMH_09");
|
| | | break;
|
| | | case 2:
|
| | | str = "我的竞拍";
|
| | | str = Language.Get("PMH_10");
|
| | | break;
|
| | | }
|
| | | return str;
|
| | | } |
| | | |
| | | private string GetRecordResultName(int index)
|
| | | {
|
| | | string str = string.Empty;
|
| | | switch (index)
|
| | | {
|
| | | case 0:
|
| | | str = "流拍";
|
| | | break;
|
| | | case 1:
|
| | | str = "拍卖成交";
|
| | | break;
|
| | | case 2:
|
| | | str = "回收";
|
| | | break;
|
| | | case 3:
|
| | | str = "竞价成功";
|
| | | break;
|
| | | case 4:
|
| | | str = "竞价失败";
|
| | | break;
|
| | |
|
| | | }
|
| | | return str;
|
| | | } |
| | |
| | | VoiceHttpRequest.Instance.samplesDecodecComplete += SamplesDecodecComplete;
|
| | | WindowCenter.Instance.windowAfterOpenEvent += WindowAfterOpenEvent;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | PlayerRealmData.OnPlayerCollectEnd += OnPlayerCollectEnd;
|
| | | //SnxxzGame.Instance.AddApplicationOutAction(OnApplicationQuit);
|
| | | PrepareHandler.Instance.OnPrepareEnd += OnPrepareEnd;
|
| | |
|
| | | var time = bandTime;
|
| | | banTimeArray[0] = time.Year;
|
| | |
| | |
|
| | | #region 仙盟宴会采集完后打开聊天界面
|
| | | bool openChatAfterCollect = false;
|
| | | private void OnPlayerCollectEnd(int playerId, byte type)
|
| | | private void OnPrepareEnd(int playerId, int type)
|
| | | {
|
| | | if (playerId == PlayerDatas.Instance.baseData.PlayerID
|
| | | && type == 0 && PlayerDatas.Instance.baseData.MapID == 31230)
|
| | |
| | | |
| | | private void OpenStrengthenWin() |
| | | { |
| | | CloseSubWindows(); |
| | | CloseSubWindows();
|
| | | WindowCenter.Instance.Open<EquipStrengthWin>();
|
| | | functionOrder = m_Strengthen.order; |
| | | } |
| | | |
| | | private void OpenInlayWin() |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, March 11, 2019 |
| | | //-------------------------------------------------------- |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | |
| | | public class EquipStrengthHeadBehaviour: CellView
|
| | | {
|
| | | [SerializeField] Text m_EquipHeadName;
|
| | | [SerializeField] Transform m_UpArrow;
|
| | | [SerializeField] Transform m_DownArrow;
|
| | | [SerializeField] Transform m_ContainerSelect;
|
| | | [SerializeField] Button m_Select;
|
| | | [SerializeField] RedpointBehaviour m_Redpoint;
|
| | |
|
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
|
| | | EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } }
|
| | |
|
| | | int equipLevel = 0;
|
| | |
|
| | | public void Display(int level)
|
| | | {
|
| | | this.equipLevel = level;
|
| | |
|
| | | var equipSet = equipModel.GetEquipSet(level);
|
| | | if (equipSet != null)
|
| | | {
|
| | | var realmConfig = RealmConfig.Get(equipSet.realm);
|
| | | if (realmConfig != null)
|
| | | {
|
| | | m_EquipHeadName.text = string.Format("{0}装备", realmConfig.Name);
|
| | | }
|
| | | }
|
| | |
|
| | | var select = strengthModel.SelectLevel == level;
|
| | |
|
| | | m_UpArrow.gameObject.SetActive(select);
|
| | | m_DownArrow.gameObject.SetActive(!select);
|
| | | m_ContainerSelect.gameObject.SetActive(select);
|
| | |
|
| | | m_Select.SetListener(OnSelect);
|
| | |
|
| | | Redpoint redpoint;
|
| | | m_Redpoint.redpointId = 0;
|
| | | } |
| | | |
| | | private void OnSelect()
|
| | | {
|
| | | if (strengthModel.SelectLevel == equipLevel)
|
| | | {
|
| | | strengthModel.SelectLevel = -1;
|
| | | }
|
| | | else
|
| | | {
|
| | | strengthModel.SelectLevel = equipLevel;
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from System/Realm/RealmCollectWin.cs.meta
copy to System/EquipGem/EquipStrengthHeadBehaviour.cs.meta
| File was copied from System/Realm/RealmCollectWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 750c734c2d7b6fc4c85368c8bbf4d499 |
| | | timeCreated: 1507974546 |
| | | licenseType: Free |
| | | guid: a2cb60c81a96d0d4da13e0543ef1fd64 |
| | | timeCreated: 1552292183 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, March 11, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using Snxxz.UI;
|
| | | using System;
|
| | | //装备强化
|
| | | public class EquipStrengthClass
|
| | | {
|
| | | public int EquipIndex;//强化部位
|
| | | public int EquipPartStarLV;//等级
|
| | | public int Proficiency;//经验
|
| | | public int EvolveLV;//进化等级
|
| | | public int PackType;//强化类型
|
| | |
|
| | | }
|
| | | public class EquipStrengthModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | Dictionary<int, EquipStrengthClass> EquipStrengthDic = new Dictionary<int, EquipStrengthClass>();
|
| | | public event Action EquipStrengthUpdate;//强化数据刷新
|
| | | public event Action SelectEquipRefresh;//二级页签刷新
|
| | | public event Action SelectLevelRefresh;//一级页签刷新
|
| | | private int selectLevel = 0;
|
| | | public int SelectLevel//装备类别
|
| | | {
|
| | | get { return selectLevel; }
|
| | | set
|
| | | {
|
| | | if (selectLevel != value)
|
| | | {
|
| | | selectLevel = value;
|
| | | if (SelectLevelRefresh != null)
|
| | | {
|
| | | SelectLevelRefresh();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | private int selectEquipPlace = -1;//装备部位
|
| | | public int SelectEquipPlace//装备类别
|
| | | {
|
| | | get { return selectEquipPlace; }
|
| | | set
|
| | | {
|
| | | if (selectEquipPlace != value)
|
| | | {
|
| | | selectEquipPlace = value;
|
| | | if (SelectEquipRefresh != null)
|
| | | {
|
| | | SelectEquipRefresh();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | public override void Init()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | public void GetEuipPartPlusInfo(HA3B3_tagMCEquipPartPlusInfo info)
|
| | | {
|
| | | for (int i = 0; i < info.Count; i++)
|
| | | {
|
| | | var equipPartPlus = info.InfoList[i];
|
| | | EquipStrengthClass equipStrength = new EquipStrengthClass();
|
| | | equipStrength.PackType = equipPartPlus.PackType;
|
| | | equipStrength.EquipIndex = equipPartPlus.EquipIndex;
|
| | | equipStrength.EquipPartStarLV = equipPartPlus.EquipPartStarLV;
|
| | | equipStrength.Proficiency = (int)equipPartPlus.Proficiency;
|
| | | equipStrength.EvolveLV = equipPartPlus.EvolveLV;
|
| | | if (EquipStrengthDic.ContainsKey(equipPartPlus.EquipIndex))
|
| | | {
|
| | | EquipStrengthDic[equipPartPlus.EquipIndex] = equipStrength;
|
| | | }
|
| | | else
|
| | | {
|
| | | EquipStrengthDic.Add(equipPartPlus.EquipIndex, equipStrength);
|
| | | }
|
| | | }
|
| | | if (EquipStrengthUpdate != null)
|
| | | {
|
| | | EquipStrengthUpdate();
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | |
| | | |
| | | |
copy from System/Realm/RealmCollectWin.cs.meta
copy to System/EquipGem/EquipStrengthModel.cs.meta
| File was copied from System/Realm/RealmCollectWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 750c734c2d7b6fc4c85368c8bbf4d499 |
| | | timeCreated: 1507974546 |
| | | licenseType: Free |
| | | guid: 82db210fd517eaa4c98ec367397d6558 |
| | | timeCreated: 1552289828 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, March 11, 2019 |
| | | //-------------------------------------------------------- |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | |
| | | public class EquipStrengthSelectBehaviour: CellView
|
| | | {
|
| | | [SerializeField] Transform m_ContainerEquip;
|
| | | [SerializeField] Transform m_ContainerUnEquip;
|
| | | [SerializeField] Text m_EquipPlaceName;
|
| | | [SerializeField] Transform m_ContainerSelect;
|
| | | [SerializeField] ItemCell m_Item;
|
| | | [SerializeField] Text m_ItemName;
|
| | | [SerializeField] TinyGem[] m_TinyGems;
|
| | | [SerializeField] Button m_Select;
|
| | | [SerializeField] RedpointBehaviour m_Redpoint;
|
| | |
|
| | | EquipGemModel model { get { return ModelCenter.Instance.GetModel<EquipGemModel>(); } }
|
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
|
| | | EquipStarModel equipStarModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } }
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | |
|
| | | int equipLevel = 0;
|
| | | int equipPlace = 0;
|
| | | string equipGuid = string.Empty;
|
| | |
|
| | | public void Display(int level, int place)
|
| | | {
|
| | | this.equipLevel = level;
|
| | | this.equipPlace = place;
|
| | |
|
| | | var equipSet = equipModel.GetEquipSet(equipLevel);
|
| | | equipGuid = equipSet.GetEquip(equipPlace);
|
| | |
|
| | | var equiped = !string.IsNullOrEmpty(equipGuid);
|
| | | m_ContainerEquip.gameObject.SetActive(equiped);
|
| | | m_ContainerUnEquip.gameObject.SetActive(!equiped);
|
| | |
|
| | | m_Select.SetListener(() => { model.selectEquipPlace = equipPlace; });
|
| | |
|
| | | if (equiped)
|
| | | {
|
| | | DisplayBase();
|
| | | DisplayGems();
|
| | |
|
| | | EquipGemRedpoint equipGemRedpoint;
|
| | | if (model.TryGetRedpoint(level, place, out equipGemRedpoint))
|
| | | {
|
| | | m_Redpoint.redpointId = equipGemRedpoint.repoint.id;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Redpoint.redpointId = 0;
|
| | | DisplayUnEquip();
|
| | | }
|
| | |
|
| | | m_ContainerSelect.gameObject.SetActive(model.selectEquipPlace == equipPlace);
|
| | | }
|
| | |
|
| | | void DisplayBase()
|
| | | {
|
| | | var item = packModel.GetItemByGuid(equipGuid);
|
| | | if (item != null)
|
| | | {
|
| | | m_Item.Init(item);
|
| | | m_ItemName.text = item.config.ItemName;
|
| | | m_ItemName.color = UIHelper.GetUIColor(item.config.ItemColor, true);
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayGems()
|
| | | {
|
| | | List<EquipGem> equipGems = null;
|
| | | model.TryGetEquipGems(equipLevel, equipPlace, out equipGems);
|
| | | for (int i = 0; i < m_TinyGems.Length; i++)
|
| | | {
|
| | | bool isOpen = model.IsEquipGemHoleOpen(equipLevel, equipPlace, i);
|
| | | m_TinyGems[i].gameObject.SetActive(isOpen);
|
| | | if (isOpen)
|
| | | {
|
| | | var id = (equipGems != null && i < equipGems.Count) ? equipGems[i].id : 0;
|
| | | m_TinyGems[i].Set(id);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayUnEquip()
|
| | | {
|
| | | if (GeneralDefine.equipPlaceNameDict.ContainsKey(equipPlace))
|
| | | {
|
| | | m_EquipPlaceName.text = Language.Get("L1076", GeneralDefine.equipPlaceNameDict[equipPlace]);
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from System/Realm/RealmCollectWin.cs.meta
copy to System/EquipGem/EquipStrengthSelectBehaviour.cs.meta
| File was copied from System/Realm/RealmCollectWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 750c734c2d7b6fc4c85368c8bbf4d499 |
| | | timeCreated: 1507974546 |
| | | licenseType: Free |
| | | guid: cba1c47f88dcbfc4a9c01fa2738ba5c8 |
| | | timeCreated: 1552292412 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, March 11, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class EquipStrengthWin : Window |
| | | {
|
| | | [SerializeField] ScrollerController m_Controller;
|
| | |
|
| | | EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } }
|
| | | EquipGemModel model { get { return ModelCenter.Instance.GetModel<EquipGemModel>(); } } |
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_Controller.OnRefreshCell += OnRefreshCell; |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | DisplayEquips();
|
| | | strengthModel.SelectEquipRefresh += SelectEquipRefresh;
|
| | | strengthModel.SelectLevelRefresh += SelectLevelRefresh;
|
| | | strengthModel.EquipStrengthUpdate += EquipStrengthUpdate; |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | {
|
| | | strengthModel.SelectEquipRefresh -= SelectEquipRefresh;
|
| | | strengthModel.SelectLevelRefresh -= SelectLevelRefresh;
|
| | | strengthModel.EquipStrengthUpdate -= EquipStrengthUpdate; |
| | | }
|
| | |
|
| | | |
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | | #endregion
|
| | | private void EquipStrengthUpdate()
|
| | | {
|
| | | }
|
| | | void DisplayEquips()
|
| | | {
|
| | | m_Controller.Refresh();
|
| | | var equipSets = equipModel.GetAllEquipSets();
|
| | | foreach (var level in equipSets)
|
| | | {
|
| | | var equipSet = equipModel.GetEquipSet(level);
|
| | | if (equipSet == null)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | if (equipSet.unLocked)
|
| | | {
|
| | | var slotCount = model.GetUnlockEquipSlotCount(level);
|
| | | if (slotCount > 0)
|
| | | {
|
| | | m_Controller.AddCell(ScrollerDataType.Header, level);
|
| | | if (model.selectLevel == level)
|
| | | {
|
| | | var places = model.GetMosaicEquipPlaces();
|
| | | foreach (var place in places)
|
| | | {
|
| | | if (equipSet.IsSlotUnLocked(place))
|
| | | {
|
| | | m_Controller.AddCell(ScrollerDataType.Normal, level * 1000 + place);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | m_Controller.Restart();
|
| | | }
|
| | | private void SelectEquipRefresh()
|
| | | {
|
| | | m_Controller.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | |
|
| | | private void SelectLevelRefresh()
|
| | | {
|
| | | DisplayEquips();
|
| | | } |
| | | private void OnRefreshCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | switch (type)
|
| | | {
|
| | | case ScrollerDataType.Header:
|
| | | var equipGemHeadCell = cell as EquipStrengthHeadBehaviour;
|
| | | equipGemHeadCell.Display(cell.index);
|
| | | break;
|
| | | case ScrollerDataType.Normal:
|
| | | var level = cell.index / 1000;
|
| | | var place = cell.index % 1000;
|
| | | var equipSelectCell = cell as EquipStrengthSelectBehaviour;
|
| | | equipSelectCell.Display(level, place);
|
| | | break;
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
copy from System/Realm/RealmCollectWin.cs.meta
copy to System/EquipGem/EquipStrengthWin.cs.meta
| File was copied from System/Realm/RealmCollectWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 750c734c2d7b6fc4c85368c8bbf4d499 |
| | | timeCreated: 1507974546 |
| | | licenseType: Free |
| | | guid: 95006410bf30c1f42b5c45a2327adf0b |
| | | timeCreated: 1552289263 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | |
| | | [SerializeField] Text m_Description;
|
| | | [SerializeField] ItemBehaviour[] m_Items;
|
| | | [SerializeField] Button m_Goto;
|
| | | [SerializeField] Button m_Close;
|
| | |
|
| | | AllianceBossModel allianceBossModel { get { return ModelCenter.Instance.GetModel<AllianceBossModel>(); } }
|
| | | DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
|
| | |
| | | protected override void AddListeners()
|
| | | {
|
| | | m_Goto.AddListener(GotoAllianceBoss);
|
| | | m_Close.AddListener(CloseClick);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | |
| | | }
|
| | |
|
| | | string[] mailCont = _mailModel.Content.Split(new string[] { "{0}" }, StringSplitOptions.None);
|
| | |
|
| | | if (mailCont != null && mailCont.Length > 0 && _mailParalist.Count != mailCont.Length)
|
| | | {
|
| | | DebugEx.Log("参数数量不一致" + info.Text);
|
| | | }
|
| | |
|
| | | for (int i = 0; i < mailCont.Length; i++)
|
| | | {
|
| | | if (i < mailCont.Length - 1)
|
| | |
| | | {
|
| | | get
|
| | | {
|
| | | return WindowCenter.Instance.IsOpen<RealmCollectWin>();
|
| | | return WindowCenter.Instance.IsOpen<NormalCollectWin>();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | presentHrefInfo.Add(split_value, array[1]);
|
| | | }
|
| | | break;
|
| | | case "auctionbidding":
|
| | | {
|
| | | presentHrefInfo.mEvents.Add(RichTextEventEnum.AuctionBidding);
|
| | | presentHrefInfo.Add(split_value, array[1]);
|
| | | }
|
| | | break;
|
| | | default:
|
| | | {
|
| | | presentHrefInfo.Add(split_value, array[1]);
|
| | |
| | | GetWay,//获取途径
|
| | | JOINTEAM,//加入队伍
|
| | | AncientRobotName,//上古战场随机名字
|
| | | AuctionBidding,//集市竞价
|
| | | }
|
| | |
| | | RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.GetWay, this);
|
| | | RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.JOINTEAM, this);
|
| | | RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.AncientRobotName, this);
|
| | | RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.AuctionBidding, this);
|
| | | }
|
| | |
|
| | | public override bool Execute(RichTextEventEnum type, RichTextMgr.HrefInfo href)
|
| | |
| | | }
|
| | | }
|
| | | break;
|
| | | case RichTextEventEnum.AuctionBidding:
|
| | | {
|
| | | if (href.mSplits.ContainsKey("auctionbidding"))
|
| | | {
|
| | | var guid = href.mSplits["auctionbidding"];
|
| | | //--竞价
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | return false;
|
| | | }
|
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Saturday, October 14, 2017
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class NormalCollectWin : Window
|
| | | {
|
| | | [SerializeField] SmoothSlider m_SmoothSlider;
|
| | | [SerializeField] Text m_Progress;
|
| | | [SerializeField] Text m_FairyFeastTip;
|
| | |
|
| | | DateTime endTime;
|
| | | float currentProgress = 0;
|
| | |
|
| | | public static PrepareHandler.ClientH0812 s_CollectInfo;
|
| | |
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | currentProgress = 0f;
|
| | |
|
| | | m_SmoothSlider.ResetValue(0);
|
| | |
|
| | | m_Progress.text = StringUtility.Contact(currentProgress, "%");
|
| | |
|
| | | endTime = TimeUtility.ServerNow.AddMilliseconds(s_CollectInfo.MaxTime);
|
| | |
|
| | | var mapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
|
| | | m_FairyFeastTip.gameObject.SetActive(mapId == 31230);
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | if (!PrepareHandler.Instance.isPreparing)
|
| | | {
|
| | | CloseClick();
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void LateUpdate()
|
| | | {
|
| | | var progress = 1 - (float)(endTime - TimeUtility.ServerNow).TotalMilliseconds / s_CollectInfo.MaxTime;
|
| | | m_SmoothSlider.value = progress;
|
| | |
|
| | | progress = (float)Math.Round(progress * 100, 0);
|
| | | if (currentProgress != progress)
|
| | | {
|
| | | currentProgress = progress;
|
| | | m_Progress.text = StringUtility.Contact(currentProgress, "%");
|
| | | }
|
| | |
|
| | | if (currentProgress >= 1)
|
| | | {
|
| | | CloseImmediately();
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| File was renamed from System/Realm/RealmCollectWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 750c734c2d7b6fc4c85368c8bbf4d499 |
| | | timeCreated: 1507974546 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | | fileFormatVersion: 2
|
| | | guid: 750c734c2d7b6fc4c85368c8bbf4d499
|
| | | timeCreated: 1507974546
|
| | | licenseType: Free
|
| | | MonoImporter:
|
| | | serializedVersion: 2
|
| | | defaultReferences: []
|
| | | executionOrder: 0
|
| | | icon: {instanceID: 0}
|
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | public class PlayerSitHandler : Singleton<PlayerSitHandler>
|
| | | {
|
| | | public bool isSit { get; private set; }
|
| | |
|
| | | public Dictionary<uint, byte> playerSitDict { get; private set; }
|
| | |
|
| | | public void ReceivePackage(H0411_tagPlayerSit vNetData)
|
| | | {
|
| | | if (playerSitDict == null)
|
| | | {
|
| | | playerSitDict = new Dictionary<uint, byte>();
|
| | | }
|
| | | playerSitDict[vNetData.PlayerID] = vNetData.Type;
|
| | |
|
| | | GActorPlayerBase playerBase = GAMgr.Instance.GetBySID(vNetData.PlayerID) as GActorPlayerBase;
|
| | | if (playerBase != null)
|
| | | {
|
| | | if (vNetData.Type == 0)
|
| | | {
|
| | | GA_Player player = playerBase as GA_Player;
|
| | | if (player != null)
|
| | | {
|
| | | player.StopMoveToPosition();
|
| | | }
|
| | | playerBase.Dazuo();
|
| | | }
|
| | | else if (vNetData.Type == 1)
|
| | | {
|
| | | playerBase.IdleImmediate();
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
copy from System/Realm/RealmCollectWin.cs.meta
copy to System/Realm/PlayerSitHandler.cs.meta
| File was copied from System/Realm/RealmCollectWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 750c734c2d7b6fc4c85368c8bbf4d499 |
| | | timeCreated: 1507974546 |
| | | licenseType: Free |
| | | guid: 1b34b1d36e3ce9d42b77359b37c09df5 |
| | | timeCreated: 1552289981 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |