Merge remote-tracking branch 'origin/master' into Skill_Polymorph_BeatBackPlayer
| | |
| | | GUILayout.EndHorizontal();
|
| | |
|
| | | EditorGUILayout.Space();
|
| | | #endif
|
| | | GUILayout.BeginHorizontal();
|
| | | EditorGUILayout.TextField("SDK Project Path", ClientPackage.SDK_PLUGIN_PROJECT);
|
| | | if (GUILayout.Button("Browse", GUILayout.MaxWidth(75f)))
|
| | |
| | | GUILayout.EndHorizontal();
|
| | |
|
| | | EditorGUILayout.Space();
|
| | | #endif
|
| | |
|
| | | publishers = EditorGUILayout.TextField("Publishers", publishers, GUILayout.Height(50));
|
| | |
|
| | |
| | | SoundPlayer.CreateSoundPlayer();
|
| | | SoundPlayer.Instance.PlayLoginMusic();
|
| | | SystemSetting.Instance.SetSoundVolume(SystemSetting.Instance.GetSoundVolume());
|
| | | SystemSetting.Instance.SetGameFrame(SystemSetting.Instance.GetGameFrame());
|
| | |
|
| | | SDKUtility.Instance.Init();
|
| | | GameObjectPoolManager.Instance.gameObject.name = "GameObjectPool";
|
| | |
| | | IEnumerator Co_Lanuch()
|
| | | {
|
| | | #if !UNITY_EDITOR
|
| | | if (VersionConfig.Get().versionAuthority == VersionAuthority.Release)
|
| | | while (!SDKUtility.Instance.InitFinished)
|
| | | {
|
| | | while (!SDKUtility.Instance.InitFinished)
|
| | | {
|
| | | yield return null;
|
| | | }
|
| | | yield return null;
|
| | | }
|
| | | #endif
|
| | | var cpu = 2;
|
| | |
| | | while (!LaunchPostProcess.Instance.completed
|
| | | && LaunchPostProcess.Instance.progress < (Application.platform == RuntimePlatform.WindowsEditor ? 1f : 0.8f))
|
| | | {
|
| | | progress = Mathf.Clamp(progressBuf + LaunchPostProcess.Instance.progress * 1.25f, progressBuf, 1f);
|
| | | progress = Mathf.Clamp(progressBuf + LaunchPostProcess.Instance.progress * (1 - progressBuf), progressBuf, 1f);
|
| | | yield return null;
|
| | | }
|
| | |
|
| | |
| | | mapInitOkEvent();
|
| | | }
|
| | |
|
| | | //切地图重置pk boss状态
|
| | | //�е�ͼ����pk boss״̬
|
| | | PlayerDatas.Instance.extersion.bossState = 2;
|
| | | PlayerDatas.Instance.extersion.pkState = 2;
|
| | |
|
| | |
| | | }
|
| | |
|
| | | SettingMgr.Instance.SetIsRecordData(PlayerDatas.Instance.baseData.PlayerID.ToString());
|
| | | |
| | | SnxxzGame.Instance.StartCoroutine(DelayHandleMapArea());
|
| | | }
|
| | |
|
| | | IEnumerator DelayHandleMapArea()
|
| | | {
|
| | | yield return WaitingForSecondConst.WaitMS500;
|
| | |
|
| | | bool _result = MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);
|
| | |
|
| | | if (MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss))
|
| | | {
|
| | | PlayerDatas.Instance.hero.EnterArea((int)MapArea.E_Type.Boss);
|
| | | }
|
| | | }
|
| | |
|
| | | IEnumerator DelayNpcHandler(int npcID)
|
| | |
| | | var _code = (int)_json["code"];
|
| | | switch (_code)
|
| | | {
|
| | | case CodeA2U.DeviceInfo:
|
| | | case CodeA2U.DeviceInfo:
|
| | |
|
| | | Device = new DeviceInfo
|
| | | {
|
| | | imei = _json["imei"].ToString(),
|
| | | uniqueID = _json["unique_id"].ToString(),
|
| | | macAddress = _json["mac"].ToString(),
|
| | | androidID = _json["android_id"].ToString(),
|
| | | userAgent = _json["userAgent"].ToString(),
|
| | | totalMemory = (int)_json["memoryTotal"]
|
| | | };
|
| | |
|
| | | Device = new DeviceInfo ();
|
| | | Device.uniqueID = _json ["unique_id"].ToString ();
|
| | | Device.androidID = _json ["android_id"].ToString ();// ios平台下为idfa
|
| | | Device.userAgent = _json ["userAgent"].ToString ();
|
| | | #if UNITY_ANDROID
|
| | | Device.macAddress = _json ["mac"].ToString ();
|
| | | Device.imei = _json ["imei"].ToString ();
|
| | | Device.totalMemory = (int)_json ["memoryTotal"];
|
| | | #endif
|
| | | if (OnDeviceInfoChanged != null)
|
| | | {
|
| | | OnDeviceInfoChanged(Device);
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | | public struct DeviceInfo
|
| | | public class DeviceInfo
|
| | | {
|
| | | public string imei;
|
| | | public string macAddress;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | //Debug.LogFormat("{0} 攻击 {1}, 境界: {2} <=> {3}, 是否产生了压制: {4}",
|
| | | // caster.ServerInstID, target.ServerInstID, _casterRealm, _targetRealm, _casterRealm > _targetRealm);
|
| | | if (attackType == (int)HurtAttackType.Suppress)
|
| | | {
|
| | | _casterRealm = 1;
|
| | | _targetRealm = 0;
|
| | | _pattern = (PopUpNum.Pattern)(((int)HurtAttackType.Normal - 1) * 3);
|
| | | }
|
| | |
|
| | | var popupInfo = new PopUpNum.PopupInfo()
|
| | | {
|
| | |
| | | _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/CopyOfThePanel/HighSettingTip/Container_Treasure");
|
| | | _temp.gameObject.SetActive(false);
|
| | |
|
| | | _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/InGameDownLoadProgress");
|
| | | _temp.localScale = Vector3.zero;
|
| | |
|
| | | _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/SkillButtonTip/Pivot/CastSkillTip/SwitchPan_a");
|
| | | _temp.localScale = Vector3.zero;
|
| | | _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/SkillButtonTip/Pivot/CastSkillTip/Btn_SkillXp");
|
| | |
| | |
|
| | | _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/CopyOfThePanel/HighSettingTip/Container_Treasure");
|
| | | _temp.gameObject.SetActive(true);
|
| | | |
| | | _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/InGameDownLoadProgress");
|
| | | _temp.localScale = Vector3.one;
|
| | |
|
| | | _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/SkillButtonTip/Pivot/CastSkillTip/SwitchPan_a");
|
| | | _temp.localScale = Vector3.one;
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (m_MoveToEffect)
|
| | | {
|
| | | SFXPlayUtility.Instance.Release(m_MoveToEffect);
|
| | | m_MoveToEffect = null;
|
| | | }
|
| | |
|
| | | mDestroy = true;
|
| | |
|
| | | m_SpecialGuideId = -1;
|
| | |
| | | _temp = WindowCenter.Instance.Get<MainInterfaceWin>().transform.Find("CopyOfThePanel/HighSettingTip/Container_Treasure");
|
| | | _temp.gameObject.SetActive(true);
|
| | |
|
| | | _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/InGameDownLoadProgress");
|
| | | _temp.localScale = Vector3.one;
|
| | |
|
| | | _temp = WindowCenter.Instance.Get<MainInterfaceWin>().transform.Find("SkillButtonTip/Pivot/CastSkillTip/SwitchPan_a");
|
| | | _temp.localScale = Vector3.one;
|
| | | _temp = WindowCenter.Instance.Get<MainInterfaceWin>().transform.Find("SkillButtonTip/Pivot/CastSkillTip/Btn_SkillXp");
|
| | |
| | | && InGameDownLoad.Instance.completeDownLoadAccount == PlayerDatas.Instance.baseData.AccID)
|
| | | {
|
| | | m_ProgressText.gameObject.SetActive(true);
|
| | | m_ProgressText.text = "100%";
|
| | | var progress = Mathf.RoundToInt(InGameDownLoad.Instance.progress * 100);
|
| | | m_ProgressText.text = StringUtility.Contact(progress, "%");
|
| | | this.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | |
| | | case InGameDownLoad.State.Award:
|
| | | this.gameObject.SetActive(true);
|
| | | m_ProgressText.gameObject.SetActive(true);
|
| | | m_ProgressText.text = "100%";
|
| | | var progress = Mathf.RoundToInt(InGameDownLoad.Instance.progress * 100);
|
| | | m_ProgressText.text = StringUtility.Contact(progress, "%");
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | m_ProgressSlider.fillAmount = InGameDownLoad.Instance.progress;
|
| | |
|
| | | if (m_ProgressText != null)
|
| | | if (InGameDownLoad.Instance.state == InGameDownLoad.State.DownLoad)
|
| | | {
|
| | | var progress = Mathf.RoundToInt(InGameDownLoad.Instance.progress * 100);
|
| | | m_ProgressText.text = StringUtility.Contact(Mathf.Clamp(progress, 0, 99), "%");
|
| | | if (m_ProgressText != null)
|
| | | {
|
| | | var progress = Mathf.RoundToInt(InGameDownLoad.Instance.progress * 100);
|
| | | m_ProgressText.text = StringUtility.Contact(Mathf.Clamp(progress, 0, 99), "%");
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void OpenInGameDownloadWin()
|
| | |
| | | ClearAllChatInfo();
|
| | | }
|
| | |
|
| | | void ChatReport(ChatInfoType chatType, string content, string toPlayer)
|
| | | {
|
| | | try
|
| | | {
|
| | | var channelName = string.Empty;
|
| | | switch (chatType)
|
| | | {
|
| | | case ChatInfoType.World:
|
| | | channelName = Language.Get("ChatType_World");
|
| | | break;
|
| | | case ChatInfoType.Area:
|
| | | channelName = Language.Get("ChatType_Area");
|
| | | break;
|
| | | case ChatInfoType.Team:
|
| | | channelName = Language.Get("ChatType_Team");
|
| | | break;
|
| | | case ChatInfoType.Invite:
|
| | | channelName = Language.Get("ChatType_Invite");
|
| | | break;
|
| | | case ChatInfoType.Trumpet:
|
| | | channelName = Language.Get("ChatType_Trumpet");
|
| | | break;
|
| | | case ChatInfoType.Fairy:
|
| | | channelName = Language.Get("ChatType_Fairy");
|
| | | break;
|
| | | case ChatInfoType.Friend:
|
| | | channelName = Language.Get("PlayerDetail_PrivateChat");
|
| | | break;
|
| | | default:
|
| | | return;
|
| | | }
|
| | | OperationLogCollect.Instance.ChatReport(content, channelName, toPlayer);
|
| | | }
|
| | | catch (Exception e)
|
| | | {
|
| | | DebugEx.Log(e.Message);
|
| | | }
|
| | | }
|
| | |
|
| | | public void SendChatInfo(ChatInfoType type, string msg, ChatExtraData? info = null)
|
| | | {
|
| | | bool _dirty = false;
|
| | |
|
| | | ChatReport(type, msg, PteChatName);
|
| | |
|
| | | if (!ChatCenter.s_VoiceRegex.IsMatch(msg))
|
| | | {
|
| | | _dirty = DirtyWordConfig.IsDirtWord(msg);
|
| | |
| | | if(_cell.index!= ChatCtrl.Inst.PteChatID)
|
| | | {
|
| | | ChatCtrl.Inst.PteChatID = _cell.index;
|
| | | var _dict = friendModel.GetFriendInfoDict((byte)GroupType.RecentContact);
|
| | | if (friendModel.tempFriendData != null
|
| | | && ChatCtrl.Inst.PteChatID == friendModel.tempFriendData.PlayerID)
|
| | | {
|
| | | ChatCtrl.Inst.PteChatName = friendModel.tempFriendData.PlayerName;
|
| | | }
|
| | | else
|
| | | {
|
| | | ChatCtrl.Inst.PteChatName = _dict != null && _dict.ContainsKey((uint)ChatCtrl.Inst.PteChatID) ?
|
| | | _dict[(uint)ChatCtrl.Inst.PteChatID].PlayerName : string.Empty;
|
| | | }
|
| | | ChatCtrl.Inst.SelectRecentlyChat(ChatCtrl.Inst.PteChatID);
|
| | | m_RecentlyControl.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | |
| | | if (friendModel.tempFriendData != null)
|
| | | {
|
| | | ChatCtrl.Inst.PteChatID = (int)friendModel.tempFriendData.PlayerID;
|
| | | ChatCtrl.Inst.PteChatName = friendModel.tempFriendData.PlayerName;
|
| | | ChatCtrl.Inst.SelectRecentlyChat(ChatCtrl.Inst.PteChatID);
|
| | | return;
|
| | | }
|
| | |
| | | if (_dict != null && _dict.Count > 0)
|
| | | {
|
| | | ChatCtrl.Inst.PteChatID = (int)_dict.Keys.First();
|
| | | ChatCtrl.Inst.PteChatName = _dict[(uint)ChatCtrl.Inst.PteChatID].PlayerName;
|
| | | ChatCtrl.Inst.SelectRecentlyChat(ChatCtrl.Inst.PteChatID);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | WindowJumpMgr.Instance.ClearJumpData();
|
| | |
|
| | | WindowCenter.Instance.Close<DailyQuestWin>();
|
| | | WindowCenter.Instance.Open<RealmWin>();
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.RealmFunc1);
|
| | | }
|
| | |
|
| | | private void GetPracticePoint()
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | |
| | | if (gotoTreasureId == 0)
|
| | | {
|
| | | treasureModel.currentCategory = TreasureCategory.Human;
|
| | | WindowCenter.Instance.Open<TreasureSelectWin>();
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.TreasureFunc1);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | treasureModel.treasureGotoId = gotoTreasureId;
|
| | | var config = Config.Instance.Get<TreasureConfig>(unlockShowTreasure);
|
| | | treasureModel.currentCategory = (TreasureCategory)config.Category;
|
| | | WindowCenter.Instance.Open<TreasureSelectWin>();
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.TreasureFunc1);
|
| | | }
|
| | | else
|
| | | {
|
| | | var config = Config.Instance.Get<TreasureConfig>(gotoTreasureId);
|
| | | treasureModel.selectedTreasure = gotoTreasureId;
|
| | | treasureModel.currentCategory = (TreasureCategory)config.Category;
|
| | | WindowCenter.Instance.Open<TreasureLevelUpWin>();
|
| | |
|
| | | switch (gotoTreasureId)
|
| | | {
|
| | | case 101:
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.DhszTs);
|
| | | break;
|
| | | case 102:
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.HyqTs);
|
| | | break;
|
| | | case 103:
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.GyzTs);
|
| | | break;
|
| | | case 104:
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.LqhTs);
|
| | | break;
|
| | | case 105:
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.PlyTs);
|
| | | break;
|
| | | case 106:
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.XhqTs);
|
| | | break;
|
| | | case 107:
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.DhzTs);
|
| | | break;
|
| | | case 108:
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.ZjhlTs);
|
| | | break;
|
| | | case 109:
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.YldTs);
|
| | | break;
|
| | | case 110:
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.StfTs);
|
| | | break;
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | public const string POTENTIAL_NO_NOTIFY = "PotentialNoNotify";
|
| | | public const string FLASHSALE_REDPOINT = "FlashSale_Redpoint";
|
| | | public const string OSTIMEGIFT_REDPOINT = "OSTimeGift_Redpoint";
|
| | | public const string TRIALEXCHANGE_REDPOINT = "TrialExchange_Redpoint";
|
| | | public const string OSGIFT_REDPOINT = "OSGitf_Redpoint";
|
| | | public Dictionary<string, int[]> dayRemindDic = new Dictionary<string, int[]>();
|
| | |
|
| | | public bool GetDayRemind(string _remindKey)
|
| | |
| | | SetDayRemind(POTENTIAL_NO_NOTIFY);
|
| | | SetDayRemind(FLASHSALE_REDPOINT);
|
| | | SetDayRemind(OSTIMEGIFT_REDPOINT);
|
| | | SetDayRemind(TRIALEXCHANGE_REDPOINT);
|
| | | SetDayRemind(OSGIFT_REDPOINT);
|
| | | }
|
| | |
|
| | | private void SetDayRemind(string _key)
|
| | |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | |
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | } |
| | | } |
| | | |
| | | void OnClose() |
| | | { |
| | | CloseChild(); |
| | | CloseImmediately(); |
| | | WindowCenter.Instance.Open<MainInterfaceWin>(); |
| | | } |
| | | |
| | | void CloseChild() |
| | |
| | | {
|
| | | CheckGroupEnterDungeon(_dungeon);
|
| | | }
|
| | | else
|
| | | {
|
| | | GroupCancelEnterDungeon(_dungeon.mapId);
|
| | | }
|
| | | });
|
| | | }
|
| | | else if (teamModel.myTeam.memberCount - teamModel.myTeam.GetOnlineMemberCnt() > 0)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void GroupCancelEnterDungeon(int _mapId)
|
| | | {
|
| | | switch (_mapId)
|
| | | {
|
| | | case RealmModel.REALM_DUNGEON_ID:
|
| | | if (!WindowCenter.Instance.CheckOpen<TeamFrameWin>())
|
| | | {
|
| | | var teamModel = ModelCenter.Instance.GetModel<TeamModel>();
|
| | | teamModel.missionBuf = teamModel.currentMission = new TeamMission(31110, 1);
|
| | | WindowCenter.Instance.Open<TeamFrameWin>(false, teamModel.myTeam.inTeam ? 1 : 0);
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | private string GroupChallengeOnlyOneTip(int _mapId)
|
| | | {
|
| | | switch (_mapId)
|
| | |
| | | PlayerTaskDatas.Event_FairyAuTask -= FairyAuRefresh;
|
| | | PlayerTaskDatas.Event_FairyAuReward -= FairyAuGrades;
|
| | | taskmodel.FairyAuBool = false;
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnPlayerDie()
|
| | |
| | | void CloseButton()//关闭按钮
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<FairyAuTaskWin>();
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | void CompleteTaskDeletion()//删除完成的任务
|
| | | {
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | |
| | |
|
| | | _DicRedBag[(int)info.RedPacketInfo[i].RedPacketID].RedPacketID = (int)info.RedPacketInfo[i].RedPacketID;
|
| | | _DicRedBag[(int)info.RedPacketInfo[i].RedPacketID].PlayerID = (int)info.RedPacketInfo[i].PlayerID;
|
| | | _DicRedBag[(int)info.RedPacketInfo[i].RedPacketID].Name = info.RedPacketInfo[i].Name;
|
| | |
| | | _DicRedBag[(int)info.RedPacketInfo[i].RedPacketID].GetWay = (int)info.RedPacketInfo[i].GetWay;
|
| | | _DicRedBag[(int)info.RedPacketInfo[i].RedPacketID].PacketCnt = (int)info.RedPacketInfo[i].PacketCnt;
|
| | | _DicRedBag[(int)info.RedPacketInfo[i].RedPacketID].State = (int)info.RedPacketInfo[i].State;
|
| | | if ((int)info.RedPacketInfo[i].RedPacketID == RedBagId)
|
| | | {
|
| | | var Values = _DicRedGrabinfo.Values;
|
| | | foreach (var value in Values)
|
| | | {
|
| | | if (value.Name == PlayerDatas.Instance.baseData.PlayerName)
|
| | | {
|
| | | _DicRedBag[(int)info.RedPacketInfo[i].RedPacketID].State = 2;
|
| | | }
|
| | | }
|
| | | }
|
| | | _DicRedBag[(int)info.RedPacketInfo[i].RedPacketID].Wish = (string)info.RedPacketInfo[i].Wish;
|
| | | if (Event_RedEnvelopeToRefresh != null)
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | | IsRedBagGet();
|
| | |
| | | gridCtrl.Refresh();
|
| | | foreach (int key in redPacket._DicRedBag.Keys)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, key);
|
| | | if (redPacket._DicRedBag[key].GetWay != 5)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, key);
|
| | | } |
| | | }
|
| | | gridCtrl.Restart();
|
| | | }
|
| | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | //仙盟系统面板控制器 |
| | | public class UnionPanel : Window |
| | | { |
| | | #region 界面 |
| | | [SerializeField] GameObject funcPanel; |
| | | #endregion |
| | | |
| | | [SerializeField] Button _CloseBtn;//关闭按钮 |
| | | [SerializeField] Button _LeftBtn;//向左按钮 |
| | | [SerializeField] Button _RightBtn;//向右按钮 |
| | | |
| | | |
| | | [SerializeField] FunctionButton _FunctionsBtn;//基本功能 |
| | | [SerializeField] FunctionButton _MemberListBtn;//成员列表 |
| | | [SerializeField] FunctionButton _UnionLisBtn;//仙盟列表 |
| | | [SerializeField] FunctionButton _UnionLeagueBtn;//仙盟联赛 |
| | | [SerializeField] FunctionButton _KingTemperBtn;//王者圣殿 |
| | | [SerializeField] FunctionButtonGroup buttonGroup; |
| | | |
| | | private void OnRefreshFairyMine() |
| | | { |
| | | if (!PlayerDatas.Instance.fairyData.HasFairy) |
| | | { |
| | | InitFairyFunc(); |
| | | buttonGroup.TriggerByOrder(3); |
| | | } |
| | | } |
| | | |
| | | private void OnRefreshFariyInfo() |
| | | { |
| | | if (!_MemberListBtn.gameObject.activeInHierarchy) |
| | | { |
| | | InitFairyFunc(); |
| | | buttonGroup.TriggerByOrder(2); |
| | | } |
| | | } |
| | | |
| | | protected override void BindController() |
| | | { |
| | | |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | _FunctionsBtn.AddListener(OnBaseFunc); |
| | | _MemberListBtn.AddListener(OnMemberList); |
| | | _UnionLisBtn.AddListener(OnUnionList); |
| | | _UnionLeagueBtn.AddListener(OnUnionLeague); |
| | | _KingTemperBtn.AddListener(OnKingTemper); |
| | | _CloseBtn.onClick.AddListener(CloseClick); |
| | | _RightBtn.onClick.AddListener(buttonGroup.TriggerNext); |
| | | _LeftBtn.onClick.AddListener(buttonGroup.TriggerLast); |
| | | |
| | | } |
| | | |
| | | private void OnKingTemper() |
| | | { |
| | | CloseChildWin(); |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<KingTempleWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<KingTempleWin>(); |
| | | } |
| | | functionOrder = 5; |
| | | } |
| | | |
| | | private void OnUnionLeague() |
| | | { |
| | | CloseChildWin(); |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<FairyLeagueWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<FairyLeagueWin>(); |
| | | } |
| | | functionOrder = 4; |
| | | } |
| | | |
| | | private void OnUnionList() |
| | | { |
| | | CloseChildWin(); |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<FairyApplyWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<FairyApplyWin>(); |
| | | } |
| | | functionOrder = 3; |
| | | } |
| | | |
| | | private void OnMemberList() |
| | | { |
| | | CloseChildWin(); |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<FairyMemberWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<FairyMemberWin>(); |
| | | } |
| | | functionOrder = 2; |
| | | } |
| | | |
| | | private void OnBaseFunc() |
| | | { |
| | | CloseChildWin(); |
| | | funcPanel.SetActive(true); |
| | | functionOrder = 1; |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo += OnRefreshFariyInfo; |
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyMine += OnRefreshFairyMine; |
| | | |
| | | InitFairyFunc(); |
| | | } |
| | | |
| | | protected override void OnActived() |
| | | { |
| | | base.OnActived(); |
| | | buttonGroup.TriggerByOrder(functionOrder); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | CloseChildWin(); |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo -= OnRefreshFariyInfo; |
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyMine -= OnRefreshFairyMine; |
| | | WindowCenter.Instance.Open<MainInterfaceWin>(); |
| | | } |
| | | |
| | | |
| | | void CloseChildWin() |
| | | { |
| | | funcPanel.SetActive(false); |
| | | if (WindowCenter.Instance.CheckOpen<FairyApplyWin>()) |
| | | { |
| | | WindowCenter.Instance.CloseImmediately<FairyApplyWin>(); |
| | | } |
| | | if (WindowCenter.Instance.CheckOpen<FairyMemberWin>()) |
| | | { |
| | | WindowCenter.Instance.CloseImmediately<FairyMemberWin>(); |
| | | } |
| | | if (WindowCenter.Instance.CheckOpen<FairyLeagueWin>()) |
| | | { |
| | | WindowCenter.Instance.CloseImmediately<FairyLeagueWin>(); |
| | | } |
| | | if (WindowCenter.Instance.CheckOpen<KingTempleWin>()) |
| | | { |
| | | WindowCenter.Instance.CloseImmediately<KingTempleWin>(); |
| | | } |
| | | } |
| | | |
| | | void InitFairyFunc() |
| | | { |
| | | if (!PlayerDatas.Instance.fairyData.HasFairy) |
| | | { |
| | | _FunctionsBtn.gameObject.SetActive(false); |
| | | _MemberListBtn.gameObject.SetActive(false); |
| | | } |
| | | else |
| | | { |
| | | _FunctionsBtn.gameObject.SetActive(true); |
| | | _MemberListBtn.gameObject.SetActive(true); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | //仙盟系统面板控制器
|
| | | public class UnionPanel : Window
|
| | | {
|
| | | #region 界面
|
| | | [SerializeField] GameObject funcPanel;
|
| | | #endregion
|
| | |
|
| | | [SerializeField] Button _CloseBtn;//关闭按钮
|
| | | [SerializeField] Button _LeftBtn;//向左按钮
|
| | | [SerializeField] Button _RightBtn;//向右按钮
|
| | |
|
| | |
|
| | | [SerializeField] FunctionButton _FunctionsBtn;//基本功能
|
| | | [SerializeField] FunctionButton _MemberListBtn;//成员列表
|
| | | [SerializeField] FunctionButton _UnionLisBtn;//仙盟列表
|
| | | [SerializeField] FunctionButton _UnionLeagueBtn;//仙盟联赛
|
| | | [SerializeField] FunctionButton _KingTemperBtn;//王者圣殿
|
| | | [SerializeField] FunctionButtonGroup buttonGroup;
|
| | |
|
| | | private void OnRefreshFairyMine()
|
| | | {
|
| | | if (!PlayerDatas.Instance.fairyData.HasFairy)
|
| | | {
|
| | | InitFairyFunc();
|
| | | buttonGroup.TriggerByOrder(3);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnRefreshFariyInfo()
|
| | | {
|
| | | if (!_MemberListBtn.gameObject.activeInHierarchy)
|
| | | {
|
| | | InitFairyFunc();
|
| | | buttonGroup.TriggerByOrder(2);
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void BindController()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | _FunctionsBtn.AddListener(OnBaseFunc);
|
| | | _MemberListBtn.AddListener(OnMemberList);
|
| | | _UnionLisBtn.AddListener(OnUnionList);
|
| | | _UnionLeagueBtn.AddListener(OnUnionLeague);
|
| | | _KingTemperBtn.AddListener(OnKingTemper);
|
| | | _CloseBtn.onClick.AddListener(CloseClick);
|
| | | _RightBtn.onClick.AddListener(buttonGroup.TriggerNext);
|
| | | _LeftBtn.onClick.AddListener(buttonGroup.TriggerLast);
|
| | |
|
| | | }
|
| | |
|
| | | private void OnKingTemper()
|
| | | {
|
| | | CloseChildWin();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<KingTempleWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<KingTempleWin>();
|
| | | }
|
| | | functionOrder = 5;
|
| | | }
|
| | |
|
| | | private void OnUnionLeague()
|
| | | {
|
| | | CloseChildWin();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<FairyLeagueWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<FairyLeagueWin>();
|
| | | }
|
| | | functionOrder = 4;
|
| | | }
|
| | |
|
| | | private void OnUnionList()
|
| | | {
|
| | | CloseChildWin();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<FairyApplyWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<FairyApplyWin>();
|
| | | }
|
| | | functionOrder = 3;
|
| | | }
|
| | |
|
| | | private void OnMemberList()
|
| | | {
|
| | | CloseChildWin();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<FairyMemberWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<FairyMemberWin>();
|
| | | }
|
| | | functionOrder = 2;
|
| | | }
|
| | |
|
| | | private void OnBaseFunc()
|
| | | {
|
| | | CloseChildWin();
|
| | | funcPanel.SetActive(true);
|
| | | functionOrder = 1;
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo += OnRefreshFariyInfo;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyMine += OnRefreshFairyMine;
|
| | |
|
| | | InitFairyFunc();
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | buttonGroup.TriggerByOrder(functionOrder);
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | CloseChildWin();
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo -= OnRefreshFariyInfo;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyMine -= OnRefreshFairyMine;
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | void CloseChildWin()
|
| | | {
|
| | | funcPanel.SetActive(false);
|
| | | if (WindowCenter.Instance.CheckOpen<FairyApplyWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<FairyApplyWin>();
|
| | | }
|
| | | if (WindowCenter.Instance.CheckOpen<FairyMemberWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<FairyMemberWin>();
|
| | | }
|
| | | if (WindowCenter.Instance.CheckOpen<FairyLeagueWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<FairyLeagueWin>();
|
| | | }
|
| | | if (WindowCenter.Instance.CheckOpen<KingTempleWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<KingTempleWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | void InitFairyFunc()
|
| | | {
|
| | | if (!PlayerDatas.Instance.fairyData.HasFairy)
|
| | | {
|
| | | _FunctionsBtn.gameObject.SetActive(false);
|
| | | _MemberListBtn.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | _FunctionsBtn.gameObject.SetActive(true);
|
| | | _MemberListBtn.gameObject.SetActive(true);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | public int GetRecommendFloor()
|
| | | {
|
| | | var vipLevel = PlayerDatas.Instance.baseData.VIPLv;
|
| | | var vipNeedFloor1 = GetFloorVipRequirement(1);
|
| | | var myLevel = PlayerDatas.Instance.baseData.LV;
|
| | |
|
| | | var maxFloor = 1;
|
| | | for (int i = 0; i < sortedBosses.Count; i++)
|
| | | {
|
| | | var bossId = sortedBosses[i];
|
| | | var config = Config.Instance.Get<NPCConfig>(bossId);
|
| | | var bossHomeConfig = Config.Instance.Get<BossHomeConfig>(bossId);
|
| | | if (vipLevel < vipNeedFloor1)
|
| | | {
|
| | | if (config.NPCLV > myLevel)
|
| | | {
|
| | | return bossHomeConfig.FloorNum;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (vipLevel >= GetFloorVipRequirement(bossHomeConfig.FloorNum) && myLevel < config.NPCLV)
|
| | | {
|
| | | return bossHomeConfig.FloorNum;
|
| | | }
|
| | | }
|
| | |
|
| | | if (bossHomeConfig.FloorNum > maxFloor)
|
| | | {
|
| | | maxFloor = bossHomeConfig.FloorNum;
|
| | | }
|
| | |
|
| | | if (vipLevel >= GetFloorVipRequirement(bossHomeConfig.FloorNum) && PlayerDatas.Instance.baseData.LV < config.NPCLV)
|
| | | {
|
| | | return bossHomeConfig.FloorNum;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | [SerializeField] Transform m_ContainerPoivt;
|
| | | [SerializeField] Transform m_KillRewardExplain;
|
| | | [SerializeField] Text m_Rank;
|
| | | [SerializeField] Text m_RewardType;
|
| | | [SerializeField] RectTransform m_FirstRankRewardTip;
|
| | | [SerializeField] Transform m_DoubleReward;
|
| | | [SerializeField] Transform m_DoubleChallenge;
|
| | | [SerializeField] ScrollRect m_RewardsScroll;
|
| | |
| | |
|
| | | var rank = model.dungeonResult.rank;
|
| | | m_Rank.text = Language.Get("DemonJar7", rank);
|
| | | m_RewardType.text = Language.Get(rank == 1 ? "DemonJar9" : "DemonJar11");
|
| | | m_FirstRankRewardTip.gameObject.SetActive(rank == 1);
|
| | | m_KillRewardExplain.gameObject.SetActive(rank == 1);
|
| | | m_DamageFirstEffect.gameObject.SetActive(rank == 1);
|
| | | m_VictoryFontContainer.gameObject.SetActive(rank != 1);
|
| | |
| | | [SerializeField] Text m_ReBornTimer; |
| | | [SerializeField] Button m_Reborn; |
| | | |
| | | PlayerDeadModel _deadModel; |
| | | PlayerDeadModel DeadModel |
| | | { |
| | | get { return _deadModel ?? (_deadModel = ModelCenter.Instance.GetModel<PlayerDeadModel>()); } |
| | | } |
| | | PlayerDeadModel DeadModel { get { return ModelCenter.Instance.GetModel<PlayerDeadModel>(); } } |
| | | |
| | | float rebornTime = 0f; |
| | | float secondTimer = 0f; |
| | | bool sendReborn = false; |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | TimeDownMgr.CoolTimeData coolDown; |
| | | if (TimeDownMgr.Instance.Get(TimeDownMgr.CoolTimeType.DuplicatesReborn, out coolDown)) |
| | | { |
| | | RefreshTime(Mathf.RoundToInt(coolDown.duration - coolDown.time)); |
| | | } |
| | | secondTimer = 0f; |
| | | sendReborn = false; |
| | | |
| | | DeadModel.RefreshDuplicatesRebornCDEvent = RefreshTime; |
| | | try |
| | | { |
| | | rebornTime = Time.time + GeneralConfig.Instance.dungeonRebornClientTimes[ElderGodAreaModel.ELDERGODAREA_MAPID]; |
| | | if (rebornTime <= Time.time) |
| | | { |
| | | Reborn(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Debug.Log(ex); |
| | | rebornTime = Time.time + 10f; |
| | | } |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | if (!sendReborn) |
| | | { |
| | | Reborn(); |
| | | } |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | |
| | | } |
| | | #endregion |
| | | |
| | | private void RefreshTime(int _time) |
| | | |
| | | protected override void LateUpdate() |
| | | { |
| | | if (_time > 0) |
| | | base.LateUpdate(); |
| | | |
| | | if (Time.time >= rebornTime) |
| | | { |
| | | m_ReBornTimer.text = StringUtility.Contact("(", _time, ")"); |
| | | if (!sendReborn) |
| | | { |
| | | Reborn(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Reborn(); |
| | | secondTimer -= Time.deltaTime; |
| | | if (secondTimer < 0f) |
| | | { |
| | | secondTimer = 1f; |
| | | var surplusSecond = Mathf.RoundToInt(rebornTime - Time.time); |
| | | m_ReBornTimer.text = StringUtility.Contact("(", surplusSecond, ")"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void Reborn() |
| | | { |
| | | sendReborn = true; |
| | | DeadModel.SendRebornQuest(0); |
| | | WindowCenter.Instance.Close<ElderGodAreaRebornWin>(); |
| | | } |
| | | } |
| | | |
| | |
| | | {
|
| | | if (_ok)
|
| | | {
|
| | | EnterBossHome(config.FloorNum);
|
| | | EnterBossHome(config.FloorNum, _bossId);
|
| | | }
|
| | | }
|
| | | );
|
| | | }
|
| | | else
|
| | | {
|
| | | EnterBossHome(config.FloorNum);
|
| | | EnterBossHome(config.FloorNum, _bossId);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | if (mapConfig.MapFBType == (int)MapType.OpenCountry)
|
| | | {
|
| | | EnterBossHome(config.FloorNum);
|
| | | EnterBossHome(config.FloorNum,_bossId);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | |
|
| | | }
|
| | |
|
| | | private void EnterBossHome(int _floor)
|
| | | private void EnterBossHome(int _floor,int _bossId)
|
| | | {
|
| | | var error = 0;
|
| | | if (TestEnterBossHomeDungeon(_floor, out error))
|
| | | {
|
| | | bossHomeModel.selectedFloor = _floor;
|
| | | bossHomeModel.selectedBoss = _bossId;
|
| | | dungeonModel.SingleChallengeDungeon(BossHomeModel.BOSSHOME_MAPID, bossHomeModel.selectedFloor - 1);
|
| | | }
|
| | | else
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, October 31, 2017 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class FindPreciousFrameWin : Window |
| | | { |
| | | [SerializeField] FunctionButtonGroup m_FunctionGroup; |
| | | [SerializeField] FunctionButton m_WorldBoss; |
| | | [SerializeField] FunctionButton m_BossHome; |
| | | [SerializeField] FunctionButton m_PersonalBoss; |
| | | [SerializeField] FunctionButton m_ElderGodArea; |
| | | [SerializeField] FunctionButton m_DropRecord; |
| | | |
| | | [SerializeField] Button m_Left; |
| | | [SerializeField] Button m_Right; |
| | | [SerializeField] Button m_Close; |
| | | |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_WorldBoss.AddListener(ShowWorldBoss); |
| | | m_BossHome.AddListener(ShowBossHome); |
| | | m_PersonalBoss.AddListener(ShowPersonalBoss); |
| | | m_ElderGodArea.AddListener(ShowElderGodArea); |
| | | m_DropRecord.AddListener(ShowDropRecord); |
| | | |
| | | m_Left.AddListener(ShowLastFunction); |
| | | m_Right.AddListener(ShowNextFunction); |
| | | m_Close.AddListener(CloseClick); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | CloseSubWindows(); |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | WindowCenter.Instance.Open<MainInterfaceWin>(); |
| | | } |
| | | |
| | | protected override void OnActived() |
| | | { |
| | | base.OnActived(); |
| | | m_Left.gameObject.SetActive(m_FunctionGroup.unLockedCount > 1); |
| | | m_Right.gameObject.SetActive(m_FunctionGroup.unLockedCount > 1); |
| | | |
| | | m_FunctionGroup.TriggerByOrder(functionOrder); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | private void ShowWorldBoss() |
| | | { |
| | | CloseSubWindows(); |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<WorldBossWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<WorldBossWin>(); |
| | | } |
| | | |
| | | functionOrder = m_WorldBoss.order; |
| | | } |
| | | |
| | | private void ShowBossHome() |
| | | { |
| | | CloseSubWindows(); |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<BossHomeWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<BossHomeWin>(); |
| | | } |
| | | |
| | | functionOrder = m_BossHome.order; |
| | | } |
| | | |
| | | private void ShowPersonalBoss() |
| | | { |
| | | CloseSubWindows(); |
| | | |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<PersonalBossWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<PersonalBossWin>(); |
| | | } |
| | | |
| | | functionOrder = m_PersonalBoss.order; |
| | | } |
| | | |
| | | private void ShowElderGodArea() |
| | | { |
| | | CloseSubWindows(); |
| | | |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<ElderGodAreaWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<ElderGodAreaWin>(); |
| | | } |
| | | |
| | | functionOrder = m_ElderGodArea.order; |
| | | } |
| | | |
| | | private void ShowDropRecord() |
| | | { |
| | | CloseSubWindows(); |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<PreciousDropRecordWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<PreciousDropRecordWin>(); |
| | | } |
| | | |
| | | functionOrder = m_DropRecord.order; |
| | | } |
| | | |
| | | private void CloseSubWindows() |
| | | { |
| | | WindowCenter.Instance.CloseImmediately<WorldBossWin>(); |
| | | WindowCenter.Instance.CloseImmediately<BossHomeWin>(); |
| | | WindowCenter.Instance.CloseImmediately<PersonalBossWin>(); |
| | | WindowCenter.Instance.CloseImmediately<ElderGodAreaWin>(); |
| | | WindowCenter.Instance.CloseImmediately<PreciousDropRecordWin>(); |
| | | } |
| | | |
| | | private void ShowLastFunction() |
| | | { |
| | | m_FunctionGroup.TriggerLast(); |
| | | } |
| | | |
| | | private void ShowNextFunction() |
| | | { |
| | | m_FunctionGroup.TriggerNext(); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Tuesday, October 31, 2017
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class FindPreciousFrameWin : Window
|
| | | {
|
| | | [SerializeField] FunctionButtonGroup m_FunctionGroup;
|
| | | [SerializeField] FunctionButton m_WorldBoss;
|
| | | [SerializeField] FunctionButton m_BossHome;
|
| | | [SerializeField] FunctionButton m_PersonalBoss;
|
| | | [SerializeField] FunctionButton m_ElderGodArea;
|
| | | [SerializeField] FunctionButton m_DropRecord;
|
| | |
|
| | | [SerializeField] Button m_Left;
|
| | | [SerializeField] Button m_Right;
|
| | | [SerializeField] Button m_Close;
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_WorldBoss.AddListener(ShowWorldBoss);
|
| | | m_BossHome.AddListener(ShowBossHome);
|
| | | m_PersonalBoss.AddListener(ShowPersonalBoss);
|
| | | m_ElderGodArea.AddListener(ShowElderGodArea);
|
| | | m_DropRecord.AddListener(ShowDropRecord);
|
| | |
|
| | | m_Left.AddListener(ShowLastFunction);
|
| | | m_Right.AddListener(ShowNextFunction);
|
| | | m_Close.AddListener(CloseClick);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | CloseSubWindows();
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | m_Left.gameObject.SetActive(m_FunctionGroup.unLockedCount > 1);
|
| | | m_Right.gameObject.SetActive(m_FunctionGroup.unLockedCount > 1);
|
| | |
|
| | | m_FunctionGroup.TriggerByOrder(functionOrder);
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
|
| | | private void ShowWorldBoss()
|
| | | {
|
| | | CloseSubWindows();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<WorldBossWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<WorldBossWin>();
|
| | | }
|
| | |
|
| | | functionOrder = m_WorldBoss.order;
|
| | | }
|
| | |
|
| | | private void ShowBossHome()
|
| | | {
|
| | | CloseSubWindows();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<BossHomeWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<BossHomeWin>();
|
| | | }
|
| | |
|
| | | functionOrder = m_BossHome.order;
|
| | | }
|
| | |
|
| | | private void ShowPersonalBoss()
|
| | | {
|
| | | CloseSubWindows();
|
| | |
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<PersonalBossWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<PersonalBossWin>();
|
| | | }
|
| | |
|
| | | functionOrder = m_PersonalBoss.order;
|
| | | }
|
| | |
|
| | | private void ShowElderGodArea()
|
| | | {
|
| | | CloseSubWindows();
|
| | |
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<ElderGodAreaWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<ElderGodAreaWin>();
|
| | | }
|
| | |
|
| | | functionOrder = m_ElderGodArea.order;
|
| | | }
|
| | |
|
| | | private void ShowDropRecord()
|
| | | {
|
| | | CloseSubWindows();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<PreciousDropRecordWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<PreciousDropRecordWin>();
|
| | | }
|
| | |
|
| | | functionOrder = m_DropRecord.order;
|
| | | }
|
| | |
|
| | | private void CloseSubWindows()
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<WorldBossWin>();
|
| | | WindowCenter.Instance.CloseImmediately<BossHomeWin>();
|
| | | WindowCenter.Instance.CloseImmediately<PersonalBossWin>();
|
| | | WindowCenter.Instance.CloseImmediately<ElderGodAreaWin>();
|
| | | WindowCenter.Instance.CloseImmediately<PreciousDropRecordWin>();
|
| | | }
|
| | |
|
| | | private void ShowLastFunction()
|
| | | {
|
| | | m_FunctionGroup.TriggerLast();
|
| | | }
|
| | |
|
| | | private void ShowNextFunction()
|
| | | {
|
| | | m_FunctionGroup.TriggerNext();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
| | | foreach (var boss in bossInfos.Values)
|
| | | {
|
| | | var bossId = boss.bossId;
|
| | |
|
| | | if (!IsBossAlive(bossId))
|
| | | if (Config.Instance.ContainKey<DemonJarConfig>(bossId))
|
| | | {
|
| | | RemoveOneBossRebornNotify(bossId);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (Config.Instance.ContainKey<DemonJarConfig>(bossId))
|
| | | if (IsBossAlive(bossId))
|
| | | {
|
| | | var config = Config.Instance.Get<DemonJarConfig>(bossId);
|
| | | var grade = dungeonModel.GetDungeonGrade(new Dungeon(DemonJarModel.DEMONJAR_MAPID, config.LineID));
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | if ((bossInfos[bossId].refreshTime - DateTime.Now).TotalSeconds < PREPOSE_SECONDS)
|
| | | {
|
| | | AddOneBossRebornNotify(bossId);
|
| | | }
|
| | | else
|
| | | {
|
| | | FindPreciousTimer.Instance.AddClock(bossId, bossInfos[bossId].refreshTime);
|
| | | }
|
| | | RemoveOneBossRebornNotify(bossId);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (IsBossAlive(bossId) || (bossInfos[bossId].refreshTime - DateTime.Now).TotalSeconds < PREPOSE_SECONDS)
|
| | | {
|
| | | AddOneBossRebornNotify(bossId);
|
| | | }
|
| | | else
|
| | | {
|
| | | FindPreciousTimer.Instance.AddClock(bossId, bossInfos[bossId].refreshTime);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | selectFriendObj.SetActive(false);
|
| | | unSelectFriendObj.SetActive(true);
|
| | | ChatCtrl.Inst.PteChatID = 0;
|
| | | ChatCtrl.Inst.PteChatName = string.Empty;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | selectPlayerId = playerId;
|
| | | typeCtrl.m_Scorller.RefreshActiveCellViews();
|
| | | ChatCtrl.Inst.PteChatID = playerId;
|
| | | ChatCtrl.Inst.PteChatName = playerName;
|
| | | speakOtherNameText.text = Language.Get("Friend107", UIHelper.ServerStringTrim(playerName));
|
| | |
|
| | | friendsModel.RemoveFriendRed(lookGroupType,playerId);
|
| | |
| | | selectFriendObj.SetActive(true);
|
| | | unSelectFriendObj.SetActive(false);
|
| | | ChatCtrl.Inst.PteChatID = playerId;
|
| | | ChatCtrl.Inst.PteChatName = playerName;
|
| | | playerInfoCell.Init(playerId, groupType,playerId);
|
| | | speakOtherNameText.text = Language.Get("Friend107", UIHelper.ServerStringTrim(playerName));
|
| | | });
|
| | |
| | |
|
| | |
|
| | | ChatCtrl.Inst.PteChatID = (int)id;
|
| | | ChatCtrl.Inst.PteChatName = name;
|
| | | MapConfig mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
|
| | | string msg = StringUtility.Contact(Language.Get("KillOthersDes", mapConfig.Name, UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName)),ChatCtrl.KILL_IDENTIFY);
|
| | | ChatCtrl.Inst.SendChatInfo(ChatInfoType.Friend,msg);
|
| | |
| | |
|
| | | public List<int> dungeonCanUseMoneyIds { get; private set; }
|
| | |
|
| | | public Dictionary<int, int> dungeonRebornClientTimes { get; private set; }
|
| | | public int[] CompareEquipPlaces { get; private set;}
|
| | |
|
| | | public void Init()
|
| | | {
|
| | | try
|
| | | {
|
| | | CompareEquipPlaces = GetIntArray("EquipUpType");
|
| | | greatMasterStartLV = GetInt("GreatMasterStartLV");
|
| | | playerMaxLevel = GetInt("PlayerMaxLV");
|
| | | potentialUpSuccessRecommend = GetFloat("SPSkillType", 2) * 0.0001f;
|
| | |
| | | inGameDownLoadHighestLevelPoint = GetInt("DownReward", 2);
|
| | |
|
| | | dungeonCanUseMoneyIds = new List<int>(GetIntArray("FBEnterTickeyAuto", 1));
|
| | | dungeonRebornClientTimes = ConfigParse.GetDic<int, int>(GetInputString("DuplicatesRebornTime", 2));
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | | [SerializeField] Button xbBtn;
|
| | | [SerializeField] Text xbBtnText;
|
| | | [SerializeField] Text xbBtnMoneyText;
|
| | | [SerializeField] Text xbOneDesText;
|
| | | [SerializeField] Button xbManyBtn;
|
| | | [SerializeField] Text xbManyBtnText;
|
| | | [SerializeField] Text xbManyMoneyText;
|
| | | [SerializeField] Text xbManyDesText;
|
| | | [SerializeField] Button freeXbBtn;
|
| | | [SerializeField] Text luckText;
|
| | | [SerializeField] GameObject luckDesObj;
|
| | |
| | | }
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | XBModel.RefreshAgainXBAct += RefreshAgainXB;
|
| | | XBModel.StartXBEvent += OnStartXB;
|
| | | XBModel.RefreshBestXBTimeAct += RefreshFreeTime;
|
| | | XBModel.RefreshXBTypeInfoAct += RefreshXBTypeInfo;
|
| | | XBModel.RefreshXBResultAct += RefreshXBResult;
|
| | |
| | | XBModel.RefreshBestXBTimeAct -= RefreshFreeTime;
|
| | | XBModel.RefreshXBResultAct -= RefreshXBResult;
|
| | | XBModel.RefreshXBTypeInfoAct -= RefreshXBTypeInfo;
|
| | | XBModel.RefreshAgainXBAct -= RefreshAgainXB;
|
| | | playerPack.RefreshItemCountAct -= RefreshItemCount;
|
| | | XBModel.StartXBEvent -= OnStartXB;
|
| | | GlobalTimeEvent.Instance.secondEvent -= RefreshSecond;
|
| | | }
|
| | | protected override void OnAfterClose()
|
| | |
| | | xbManyMoneyText.text = funcSet.xbPrices[1].ToString();
|
| | | xbOneMoney = funcSet.xbPrices[0];
|
| | | xbManyMoney = funcSet.xbPrices[1];
|
| | | xbOneDesText.text = Language.Get("HappyXB106", funcSet.costToolNums[0]);
|
| | | xbManyDesText.text = Language.Get("HappyXB106", funcSet.costToolNums[1]);
|
| | | ItemConfig itemConfig1 = Config.Instance.Get<ItemConfig>(funcSet.costToolIds[0]);
|
| | | ItemConfig itemConfig2 = Config.Instance.Get<ItemConfig>(funcSet.costToolIds[1]);
|
| | | if(itemConfig1 != null)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | private void RefreshAgainXB(HappXBTitle title, int xbType)
|
| | | {
|
| | | if (title != HappXBTitle.Best) return;
|
| | | if (xbType == 0) ClickXBBtn();
|
| | | else if (xbType == 1) ClickXBManyBtn();
|
| | | }
|
| | |
|
| | | bool isXBMany = false;
|
| | | private void ClickXBManyBtn()
|
| | | {
|
| | | if (XBModel.CheckIsEmptyGrid(PackType.rptTreasure))
|
| | | {
|
| | | int toolCnt = 0;
|
| | | int needToolCnt = 0;
|
| | | if (XBModel.IsHaveManyXBTool(1,out toolCnt,out needToolCnt))
|
| | | {
|
| | | needToolCnt= needToolCnt - toolCnt;
|
| | | int needMoney = needToolCnt * xbOneMoney;
|
| | | if(needToolCnt > 0)
|
| | | {
|
| | | ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(funcSet.costToolIds[1]);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("HappyXBCostTools", funcSet.costToolNums[1], itemConfig.ItemName,needMoney, needToolCnt), (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | CheckXBManyLimit(needMoney);
|
| | | }
|
| | | return;
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | CheckXBManyLimit(xbManyMoney);
|
| | | }
|
| | | |
| | | }
|
| | | else
|
| | | {
|
| | | CheckXBManyLimit(xbManyMoney);
|
| | | }
|
| | | |
| | | }
|
| | | XBModel.SendXBManyQuest(PackType.rptTreasure,1);
|
| | | }
|
| | |
|
| | | private void CheckXBManyLimit(int needMoney)
|
| | | private void OnStartXB(int oneOrMany)
|
| | | {
|
| | | if (UIHelper.GetMoneyCnt(1) >= (ulong)needMoney)
|
| | | if(oneOrMany == 0)
|
| | | {
|
| | | maskObj.SetActive(true);
|
| | | isXBMany = true;
|
| | | XBModel.SendXBQuest(1, 1, 2);
|
| | | isXBMany = false;
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | maskObj.SetActive(true);
|
| | | isXBMany = true;
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | private void ClickFreeXbBtn()
|
| | | {
|
| | | if (XBModel.CheckIsEmptyGrid(PackType.rptTreasure))
|
| | | {
|
| | | maskObj.SetActive(true);
|
| | | isXBMany = false;
|
| | | XBModel.SendXBQuest(1, 0, 1);
|
| | | }
|
| | | }
|
| | |
|
| | | private void ClickXBBtn()
|
| | | {
|
| | | if (XBModel.CheckIsEmptyGrid(PackType.rptTreasure))
|
| | | {
|
| | | if(XBModel.IsHaveOneXBTool(1))
|
| | | {
|
| | | XBModel.SendXBQuest(1, 0, 2);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (UIHelper.GetMoneyCnt(1) >= (ulong)xbOneMoney)
|
| | | {
|
| | | maskObj.SetActive(true);
|
| | | isXBMany = false;
|
| | | XBModel.SendXBQuest(1, 0, 0);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | | XBModel.SendOneXBQuest(PackType.rptTreasure, 1);
|
| | | }
|
| | |
|
| | | private void RefreshXBTypeInfo()
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | XBModel.StartXBEvent += OnStartXB;
|
| | | getItem.SetActive(false);
|
| | | isHaveFreeTime = XBModel.IsHaveFreeXBTime((int)XBModel.title);
|
| | | InitUI();
|
| | |
| | | XBModel.RefreshRuneXBTimeAct -= RefreshFreeTime;
|
| | | break;
|
| | | }
|
| | | XBModel.StartXBEvent -= OnStartXB;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | |
|
| | | private void ClickXBBtn()
|
| | | {
|
| | | if(UIHelper.GetMoneyCnt(1) >= (ulong)xbOneMoney)
|
| | | switch (XBModel.title)
|
| | | {
|
| | | XBModel.SetAgainXBEvent(XBModel.title,0);
|
| | | ClickBackBtn();
|
| | | case HappXBTitle.Best:
|
| | | XBModel.SendOneXBQuest(PackType.rptTreasure, 1);
|
| | | break;
|
| | | case HappXBTitle.Rune:
|
| | | XBModel.SendOneXBQuest(PackType.rptRunePack, 2);
|
| | | break;
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | private void ClickXBManyBtn()
|
| | | {
|
| | | if (UIHelper.GetMoneyCnt(1) >= (ulong)xbManyMoney)
|
| | | switch (XBModel.title)
|
| | | {
|
| | | XBModel.SetAgainXBEvent(XBModel.title,1);
|
| | | ClickBackBtn();
|
| | | case HappXBTitle.Best:
|
| | | XBModel.SendXBManyQuest(PackType.rptTreasure, 1);
|
| | | break;
|
| | | case HappXBTitle.Rune:
|
| | | XBModel.SendXBManyQuest(PackType.rptRunePack, 2);
|
| | | break;
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnStartXB(int oneOrMany)
|
| | | {
|
| | | ClickBackBtn();
|
| | | }
|
| | |
|
| | | private void ClickBackBtn()
|
| | |
| | | /// </summary>
|
| | | /// <param name="type"></param>
|
| | | /// <param name="index"></param>
|
| | | public event Action<int> StartXBEvent;
|
| | | public void SendXBQuest(int type,int index,int costType)
|
| | | {
|
| | | isXBCoolTime = true;
|
| | |
| | | treasure.TreasureIndex = (byte)index;
|
| | | treasure.CostType = (byte)costType;
|
| | | GameNetSystem.Instance.SendInfo(treasure);
|
| | | if(StartXBEvent != null)
|
| | | {
|
| | | StartXBEvent(index);
|
| | | }
|
| | | }
|
| | |
|
| | | public void SendPutOutXBItem(PackType curType,PackType targetType,int index,int isAll)
|
| | |
| | | break;
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | | public void SendOneXBQuest(PackType type,int xbType)
|
| | | {
|
| | | var funcSet = GetXBFuncSet(xbType);
|
| | | if (CheckIsEmptyGrid(type))
|
| | | {
|
| | | if (IsHaveOneXBTool(xbType))
|
| | | {
|
| | | SendXBQuest(xbType, 0, 2);
|
| | | }
|
| | | else
|
| | | {
|
| | | int xbOneMoney = funcSet.xbPrices[0];
|
| | | if (UIHelper.GetMoneyCnt(1) >= (ulong)xbOneMoney)
|
| | | {
|
| | | SendXBQuest(xbType, 0, 0);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void SendXBManyQuest(PackType type, int xbType)
|
| | | {
|
| | | var funcSet = GetXBFuncSet(xbType);
|
| | | if (CheckIsEmptyGrid(type))
|
| | | {
|
| | | int toolCnt = 0;
|
| | | int needToolCnt = 0;
|
| | | if (IsHaveManyXBTool(xbType, out toolCnt, out needToolCnt))
|
| | | {
|
| | | needToolCnt = needToolCnt - toolCnt;
|
| | | int needMoney = needToolCnt * funcSet.xbPrices[0];
|
| | | if (needMoney > 0)
|
| | | {
|
| | | ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(funcSet.costToolIds[1]);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("HappyXBCostTools", funcSet.costToolNums[1], itemConfig.ItemName, needMoney, needToolCnt), (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | CheckXBManyLimit(needMoney, xbType);
|
| | | }
|
| | | return;
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | CheckXBManyLimit(0, xbType);
|
| | | }
|
| | |
|
| | | }
|
| | | else
|
| | | {
|
| | | CheckXBManyLimit(funcSet.xbPrices[1],xbType);
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | public void CheckXBManyLimit(int needMoney,int xbtype)
|
| | | {
|
| | | if (UIHelper.GetMoneyCnt(1) >= (ulong)needMoney)
|
| | | {
|
| | | SendXBQuest(xbtype, 1, 2);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | {
|
| | | bestXBOneRed.state = RedPointState.None;
|
| | | bestXBManyRed.state = RedPointState.None;
|
| | | bestXBRed.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | if (IsHaveFreeXB(2))
|
| | |
| | | {
|
| | | runeXBOneRed.state = RedPointState.None;
|
| | | runeXBManyRed.state = RedPointState.None;
|
| | | runeXBRed.state = RedPointState.None;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | [SerializeField] Transform verRightContent;
|
| | | [SerializeField] Button xbBtn;
|
| | | [SerializeField] Text xbBtnText;
|
| | | [SerializeField] Text xbOneDesText;
|
| | | [SerializeField] Text xbBtnMoneyText;
|
| | | [SerializeField] Button xbManyBtn;
|
| | | [SerializeField] Text xbManyBtnText;
|
| | | [SerializeField] Text xbManyMoneyText;
|
| | | [SerializeField] Text xbManyDesText;
|
| | | [SerializeField] Button freeXbBtn;
|
| | | [SerializeField] GameObject luckDesObj;
|
| | | [SerializeField] Text luckText;
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | XBModel.StartXBEvent += OnStartXB;
|
| | | playerPack.RefreshItemCountAct += RefreshItemCount;
|
| | | XBModel.RefreshAgainXBAct += RefreshAgainXB;
|
| | | XBModel.RefreshRuneXBTimeAct += RefreshFreeTime;
|
| | |
| | | XBModel.RefreshXBTypeInfoAct -= RefreshXBTypeInfo;
|
| | | playerPack.RefreshItemCountAct -= RefreshItemCount;
|
| | | GlobalTimeEvent.Instance.secondEvent -= RefreshSecond;
|
| | | XBModel.StartXBEvent -= OnStartXB;
|
| | | }
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
| | | xbManyMoneyText.text = funcSet.xbPrices[1].ToString();
|
| | | xbOneMoney = funcSet.xbPrices[0];
|
| | | xbManyMoney = funcSet.xbPrices[1];
|
| | | xbOneDesText.text = Language.Get("HappyXB106", funcSet.costToolNums[0]);
|
| | | xbManyDesText.text = Language.Get("HappyXB106", funcSet.costToolNums[1]);
|
| | | ItemConfig itemConfig1 = Config.Instance.Get<ItemConfig>(funcSet.costToolIds[0]);
|
| | | ItemConfig itemConfig2 = Config.Instance.Get<ItemConfig>(funcSet.costToolIds[1]);
|
| | | if (itemConfig1 != null)
|
| | |
| | | bool isXBMany = false;
|
| | | private void ClickXBManyBtn()
|
| | | {
|
| | | if (XBModel.CheckIsEmptyGrid(PackType.rptRunePack))
|
| | | {
|
| | | int toolCnt = 0;
|
| | | int needToolCnt = 0;
|
| | | if (XBModel.IsHaveManyXBTool(2, out toolCnt,out needToolCnt))
|
| | | {
|
| | | needToolCnt = funcSet.costToolNums[1] - toolCnt;
|
| | | int needMoney = needToolCnt * xbOneMoney;
|
| | | if (needToolCnt > 0)
|
| | | {
|
| | | ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(funcSet.costToolIds[1]);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("HappyXBCostTools", funcSet.costToolNums[1], itemConfig.ItemName,needMoney, needToolCnt), (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | CheckXBManyLimit(needMoney);
|
| | | }
|
| | | return;
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | CheckXBManyLimit(xbManyMoney);
|
| | | }
|
| | |
|
| | | }
|
| | | else
|
| | | {
|
| | | CheckXBManyLimit(xbManyMoney);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void CheckXBManyLimit(int needMoney)
|
| | | {
|
| | | if (UIHelper.GetMoneyCnt(1) >= (ulong)needMoney)
|
| | | {
|
| | | maskObj.SetActive(true);
|
| | | isXBMany = true;
|
| | | XBModel.SendXBQuest(2, 1, 2);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | XBModel.SendXBManyQuest(PackType.rptRunePack, 2);
|
| | | }
|
| | |
|
| | | private void ClickXBBtn()
|
| | | {
|
| | | if(XBModel.CheckIsEmptyGrid(PackType.rptRunePack))
|
| | | {
|
| | | if (XBModel.IsHaveOneXBTool(2))
|
| | | {
|
| | | XBModel.SendXBQuest(2, 0, 2);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (UIHelper.GetMoneyCnt(1) >= (ulong)xbOneMoney)
|
| | | {
|
| | | maskObj.SetActive(true);
|
| | | isXBMany = false;
|
| | | XBModel.SendXBQuest(2, 0, 0);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | | XBModel.SendOneXBQuest(PackType.rptRunePack, 2);
|
| | | }
|
| | |
|
| | | private void ClickFreeXbBtn()
|
| | | {
|
| | | if (XBModel.CheckIsEmptyGrid(PackType.rptRunePack))
|
| | | {
|
| | | maskObj.SetActive(true);
|
| | | isXBMany = false;
|
| | | XBModel.SendXBQuest(2, 0, 1);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnStartXB(int oneOrMany)
|
| | | {
|
| | | maskObj.SetActive(true);
|
| | | if (oneOrMany == 0)
|
| | | {
|
| | | isXBMany = false;
|
| | | }
|
| | | else
|
| | | {
|
| | | isXBMany = true;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void RefreshXBTypeInfo()
|
| | | {
|
| | | XBTypeInfo typeInfo = XBModel.GetXBInfoByType(2);
|
| | |
| | | {
|
| | | if(itemAttrData.packType != PackType.rptDogzItem && itemAttrData.packType != PackType.rptDogzEquip)
|
| | | {
|
| | | dogzEquipDesText.gameObject.SetActive(false);
|
| | | if (dogzEquipDesText != null)
|
| | | {
|
| | | dogzEquipDesText.gameObject.SetActive(false);
|
| | | }
|
| | | if (itemAttrData.itemConfig.Description == "" || string.IsNullOrEmpty(itemAttrData.itemConfig.Description))
|
| | | {
|
| | | equipSourceNormal.gameObject.SetActive(true);
|
| | |
| | | equipSourceNormal.gameObject.SetActive(false);
|
| | | equipSourceDes.gameObject.SetActive(false);
|
| | | equipSourceText.gameObject.SetActive(false);
|
| | | dogzEquipDesText.gameObject.SetActive(true);
|
| | | dogzEquipDesText.text = itemAttrData.itemConfig.Description;
|
| | | if (dogzEquipDesText != null)
|
| | | {
|
| | | dogzEquipDesText.gameObject.SetActive(true);
|
| | | dogzEquipDesText.text = itemAttrData.itemConfig.Description;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | useDataDict = ConfigParse.Analysis(info.UserData);
|
| | | this.equipScore = modelInterface.SetEquipScore(itemInfo.ItemID,useDataDict);
|
| | | this.equipScore = modelInterface.SetEquipScore(packType,itemInfo.ItemID,useDataDict);
|
| | | DebugEx.Log("Pack:" + packType + "ID:" + info.ItemID + "GUID:" + info.ItemGUID);
|
| | | List<int> itemEffectTime = GetUseDataModel((int)ItemUseDataKey.Def_IudetCreateTime);
|
| | | if(itemEffectTime != null && itemEffectTime[0] != 0 && chinItemModel.ExpireTime > 0)
|
| | |
| | | SetWingsRefineMat(GetUseDataModel((int)ItemUseDataKey.Def_IudetWingMaterialItemID), GetUseDataModel((int)ItemUseDataKey.Def_IudetWingMaterialItemCount));
|
| | | }
|
| | | }
|
| | | this.score = modelInterface.SetEquipScore(id,useDataDict,isPreview);
|
| | | this.score = modelInterface.SetEquipScore(type,id,useDataDict,isPreview);
|
| | | PetEatEquipConfig petEatConfig = PetEatEquipConfig.GetEquipColorAndEquipClass(itemConfig.ItemColor,itemConfig.LV);//仙盟仓库装备积分兑换表
|
| | | this.unionWarehouseScore = 0;
|
| | | if(petEatConfig != null)
|
| | |
| | | /// 得到特殊属性的字典
|
| | | /// </summary>
|
| | | private Dictionary<AttrEnum, int> specAttrDic = new Dictionary<AttrEnum, int>();
|
| | | public int SetEquipScore(int itemId,Dictionary<int, List<int>> useDataDic = null,bool isPreview = false)
|
| | | public int SetEquipScore(PackType type,int itemId,Dictionary<int, List<int>> useDataDic = null,bool isPreview = false)
|
| | | {
|
| | | specAttrDic.Clear();
|
| | | int id = itemId;
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | return GetEquipScore(id,specAttrDic);
|
| | | return GetEquipScore(type,id,specAttrDic);
|
| | |
|
| | | }
|
| | |
|
| | |
| | | private Dictionary<AttrEnum, int> _tagGsProValueDict;
|
| | | private Dictionary<string, string> _equipGSFormulaDict = new Dictionary<string, string>(); //key 公式参数 value 参数数值
|
| | | private float curProValue = 0;
|
| | | private int GetEquipScore(int itemId, Dictionary<AttrEnum, int> specAttrDict)
|
| | | private int GetEquipScore(PackType type,int itemId, Dictionary<AttrEnum, int> specAttrDict)
|
| | | {
|
| | | tagChinModel = Config.Instance.Get<ItemConfig>(itemId);
|
| | | if (tagChinModel == null || tagChinModel.EquipPlace == 0) return 0;
|
| | | if (tagChinModel == null || !GeneralConfig.Instance.CompareEquipPlaces.Contains(tagChinModel.EquipPlace)) return 0;
|
| | |
|
| | | Equation.Instance.Clear();
|
| | | _tagGsProValueDict = EquipGSParamConfig.GetTagGsProValueDict(tagChinModel.LV, tagChinModel.ItemColor,tagChinModel.StarLevel);
|
| | |
| | | Equation.Instance.AddKeyValue("AtkSpeedC",0);
|
| | | }
|
| | | DebugEx.Log("评分:" + Equation.Instance.Eval<double>(_equipGSFormula.Numerical1));
|
| | | return Equation.Instance.Eval<int>(_equipGSFormula.Numerical1);
|
| | | if(type == PackType.rptDogzEquip || type == PackType.rptDogzItem)
|
| | | {
|
| | | return Equation.Instance.Eval<int>(_equipGSFormula.Numerical3);
|
| | | }
|
| | | else
|
| | | {
|
| | | return Equation.Instance.Eval<int>(_equipGSFormula.Numerical1);
|
| | | }
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
| | | for (i = 0; i < itemlist.Count; i++)
|
| | | {
|
| | | bool isOverdue = IsOverdue(itemlist[i].itemInfo.ItemGUID, itemlist[i].itemInfo.ItemID, itemlist[i].useDataDict);
|
| | | if (itemlist[i].equipScore > putOnDic[key].equipScore && !isOverdue)
|
| | | bool isRealm = PlayerDatas.Instance.baseData.realmLevel >= itemlist[i].chinItemModel.RealmLimit ? true : false;
|
| | | if (itemlist[i].equipScore > putOnDic[key].equipScore && !isOverdue && isRealm)
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
| | | });
|
| | | break;
|
| | | default:
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("KnapS142", needRealmImgStr.ToString(), curRealmImgStr.ToString()));
|
| | | ConfirmCancel.ShowRealmPopConfirm(Language.Get("Mail101"), Language.Get("KnapS142", needRealmImgStr.ToString(), curRealmImgStr.ToString()), Language.Get("PopConfirmWin_Promote"), () =>
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.RealmFunc1);
|
| | | });
|
| | | break;
|
| | | }
|
| | | return false;
|
| | |
| | | this.itemId = itemConfig.EffectValueA1; |
| | | this.itemConfig = Config.Instance.Get<ItemConfig>(this.itemId); |
| | | } |
| | | this.score = modelInterface.SetEquipScore(itemId,useDataDic,isPreview); |
| | | this.score = modelInterface.SetEquipScore(type,itemId,useDataDic,isPreview); |
| | | } |
| | | |
| | | public bool CheckIsCustomItem() |
| | |
| | |
|
| | | public void ShowItem()
|
| | | {
|
| | | m_PreciousItem.gameObject.SetActive(false);
|
| | | if (model.currentShowItem != default(PreciousItemGetModel.PreciousItem))
|
| | | {
|
| | | var itemModel = playerPack.GetItemModelByGUID(model.currentShowItem.guid);
|
| | |
| | | m_PreciousItem.gameObject.SetActive(true);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | m_PreciousItem.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | m_PreciousItem.gameObject.SetActive(false);
|
| | | }
|
| | | model.isGetNewItem = false;
|
| | | }
|
| | |
| | |
|
| | | if (mainModel.TaskId_Skill1.Contains(Task_ID))
|
| | | {
|
| | | int itemNumber = playerPack.GetItemCountByID(PackType.rptItem, mainModel.ItemID);//获取特殊物品
|
| | | if (itemNumber >= mainModel.ItemNumber)
|
| | | if (PlayerDatas.Instance.baseData.LV >= mainModel.TaskLv)
|
| | | {
|
| | | taskmodel.CompletionOfTask(Task_ID);
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.SkillFunc2);
|
| | |
|
| | | int itemNumber = playerPack.GetItemCountByID(PackType.rptItem, mainModel.ItemID);//获取特殊物品
|
| | | if (itemNumber >= mainModel.ItemNumber)
|
| | | {
|
| | | taskmodel.CompletionOfTask(Task_ID);
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.SkillFunc2);
|
| | | }
|
| | | else
|
| | | {
|
| | | StateDetermination();
|
| | | var mapModel = ModelCenter.Instance.GetModel<MapModel>();
|
| | | var point = mapModel.GetRecommendHangPoint();
|
| | | var config = Config.Instance.Get<MapEventPointConfig>(point);
|
| | | MapTransferUtility.Instance.MoveToNPC(config.NPCID);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | StateDetermination();
|
| | | var mapModel = ModelCenter.Instance.GetModel<MapModel>();
|
| | | var point = mapModel.GetRecommendHangPoint();
|
| | | var config = Config.Instance.Get<MapEventPointConfig>(point);
|
| | | MapTransferUtility.Instance.MoveToNPC(config.NPCID);
|
| | | WindowCenter.Instance.Open<HoistingWin>();
|
| | | }
|
| | | return;
|
| | | }
|
| | |
| | | {
|
| | | m_TitleText.text = "<color=#ec4bf6>" + TaskTitle(TaskID) + "</color>";
|
| | | }
|
| | | int itemNumber = playerPack.GetItemCountByID(PackType.rptItem, mainModel.ItemID);//获取特殊物品
|
| | | if (mainModel.TaskId_Skill1.Contains(TaskID))
|
| | | {
|
| | | if (itemNumber >= mainModel.ItemNumber)
|
| | | {
|
| | | m_TitleText.text = "<color=#109d06>" + TaskTitle(TaskID) + "</color>";
|
| | | }
|
| | | else
|
| | | {
|
| | | m_TitleText.text = "<color=#feed28>" + TaskTitle(TaskID) + "</color>";
|
| | | }
|
| | | }
|
| | | string str = taskmodel.allMissionDict[TaskID].InforList;
|
| | | var taskinfo = Config.Instance.Get<TASKINFOConfig>(str);
|
| | | if (mainModel.TaskId_Skill1.Contains(TaskID))//特殊任务
|
| | | {
|
| | | int itemNumber = playerPack.GetItemCountByID(PackType.rptItem, mainModel.ItemID);//获取特殊物品
|
| | | string Str_A = string.Format(Language.Get("PassiveSkillTask1"), mainModel.ItemID, itemNumber);
|
| | | string Str_B = Language.Get("PassiveSkillTask2");
|
| | | if (itemNumber >= mainModel.ItemNumber)
|
| | | if (PlayerDatas.Instance.baseData.LV >= mainModel.TaskLv)
|
| | | {
|
| | | m_ContentText.text = Str_B;
|
| | | string Str_A = string.Format(Language.Get("PassiveSkillTask1"), mainModel.ItemID, itemNumber);
|
| | | string Str_B = Language.Get("PassiveSkillTask2");
|
| | | if (itemNumber >= mainModel.ItemNumber)
|
| | | {
|
| | | m_ContentText.text = Str_B;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ContentText.text = Str_A;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ContentText.text = Str_A;
|
| | | }
|
| | | string Str_C = string.Format(Language.Get("PassiveSkillTask5"), mainModel.TaskLv);
|
| | | m_ContentText.text = Str_C;
|
| | | } |
| | | }
|
| | | else
|
| | | {
|
| | |
| | |
|
| | | [SerializeField] TeamInvitationEntrance m_TeamInvitationEntrance;
|
| | | #region
|
| | | private float switcherTime = 0;//主界面自动切换时间
|
| | | private int mapId = 0;
|
| | | public delegate void OnChatCallback();//聊天回调
|
| | | public static event OnChatCallback Event_ChatCallback;
|
| | | public delegate void OnDuplicates(bool _bool, float _speed);
|
| | | public static event OnDuplicates Event_Duplicates;
|
| | | public static event Action<bool> SitEvent;//关于打坐的回调
|
| | | #endregion
|
| | | private List<int> ListBossMapId = new List<int>();//用于boss区域地图id
|
| | |
|
| | |
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | switcherTime = int.Parse(Config.Instance.Get<FuncConfigConfig>("AutomaticSwitch").Numerical1);
|
| | | recordPositionBool = true;
|
| | | m_TaskAndTeamPanel.localPosition = TaskListTipAnchor1.localPosition;
|
| | | // m_LowSettingTipGroup.localPosition = m_position2_L.localPosition;
|
| | | m_CastSkillTip.localPosition = m_position1_S.localPosition;
|
| | | m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, 0);
|
| | | m_MailObj.SetActive(true);
|
| | |
| | | CheckChatTipOpen();
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;
|
| | | FunctionUnlockFlyObject.functionUnLockShowBeginEvent += UnFlodFunctionArea;
|
| | | CoroutineMgr.Instance.MaininterCDTimeEvent += OnMaininterCDTime;
|
| | | fairyModel.UpdateFairyRequestEvent += UpdateFairyRequest;
|
| | | GA_Hero.OnEnterOrExitArea += OnEnterOrExitArea;
|
| | | NewBieCenter.Instance.guideBeginEvent += OnGuideBegin;
|
| | |
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | bool IsSitBool = PlayerDatas.Instance.hero != null && MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Dazuo);//是否在打坐区域
|
| | | { |
| | | bool IsBossBool = PlayerDatas.Instance.hero != null && MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//是否在Boss区域
|
| | | if (onMainModel.IsDead || (onMainModel.IsBossAreaTask && !IsBossBool))
|
| | | {
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | if (!IsSitBool && !IsBossBool)
|
| | | if (!IsBossBool)
|
| | | {
|
| | | CopyOfThePanel.localPosition = CopyOfThePosition1.localPosition;
|
| | | CopyOfThePositionBool = true;
|
| | |
| | | horseRidBool = false;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;
|
| | | FunctionUnlockFlyObject.functionUnLockShowBeginEvent -= UnFlodFunctionArea;
|
| | | CoroutineMgr.Instance.MaininterCDTimeEvent -= OnMaininterCDTime;
|
| | | fairyModel.UpdateFairyRequestEvent -= UpdateFairyRequest;
|
| | | GA_Hero.OnEnterOrExitArea -= OnEnterOrExitArea;
|
| | | NewBieCenter.Instance.guideBeginEvent -= OnGuideBegin;
|
| | |
| | | TaskSwithButton();
|
| | | onMainModel.IsBossAreaTask = true;
|
| | | }
|
| | | if (_areaType == MapArea.E_Type.Dazuo && _enter && SitEvent != null)
|
| | | {
|
| | | SitEvent(true);
|
| | | }
|
| | | if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) < 5)
|
| | | {
|
| | | if (NewBieCenter.Instance.inGuiding)
|
| | |
| | | }
|
| | | m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
|
| | | m_BossBriefInfos.Unfold(false);
|
| | |
|
| | | if (SitEvent != null)
|
| | | {
|
| | | SitEvent(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | var inDungeon = IsDungeon();
|
| | |
|
| | | bool IsBossBool = PlayerDatas.Instance.hero == null ? false : MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//是否在Boss区域
|
| | | bool IsSitBool = PlayerDatas.Instance.hero == null ? false : MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Dazuo);//是否在打坐区域
|
| | | var isNeutralMap = GeneralConfig.Instance.neutralMaps.Contains(PlayerDatas.Instance.baseData.MapID);
|
| | |
|
| | | if (!recordPositionBool)
|
| | | {
|
| | | if (inDungeon || IsBossBool || IsSitBool || isNeutralMap)
|
| | | {
|
| | | if (IsSitBool && SitEvent != null)
|
| | | {
|
| | | SitEvent(true);
|
| | | }
|
| | | CopyOfThePanel.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
|
| | | if (inDungeon || IsBossBool || isNeutralMap)
|
| | | { |
| | | if (IsCopyOfThePanel != null)
|
| | | {
|
| | | IsCopyOfThePanel(false);
|
| | | }
|
| | | m_ContainerBossList.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
|
| | | m_BossBriefInfos.Unfold(false);
|
| | |
|
| | | if (Event_Duplicates != null && inDungeon)
|
| | | {
|
| | | Event_Duplicates(false, CopyOfThePanelSpeed);
|
| | | }
|
| | |
|
| | | CopyOfThePanel.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
|
| | | m_ContainerBossList.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
|
| | | m_BossBriefInfos.Unfold(false); |
| | | }
|
| | | if (!IsBossBool && !IsSitBool)
|
| | | if (!IsBossBool)
|
| | | {
|
| | | if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !inDungeon)
|
| | | {
|
| | | CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
|
| | | { |
| | | if (IsCopyOfThePanel != null)
|
| | | {
|
| | | IsCopyOfThePanel(true);
|
| | | }
|
| | | CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
|
| | | m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
|
| | | m_BossBriefInfos.Unfold(false);
|
| | |
|
| | | if (SitEvent != null)
|
| | | {
|
| | | SitEvent(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
|
| | |
| | | {
|
| | | var inDungeon = IsDungeon();
|
| | | bool IsBossBool = MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);
|
| | | bool IsSitBool = MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Dazuo);
|
| | | var isNeutralMap = GeneralConfig.Instance.neutralMaps.Contains(PlayerDatas.Instance.baseData.MapID);
|
| | |
|
| | | if (recordPositionBool)//显示功能入口
|
| | | {
|
| | | if (inDungeon || IsBossBool || IsSitBool || isNeutralMap)
|
| | | if (inDungeon || IsBossBool || isNeutralMap)
|
| | | {
|
| | | if (IsSitBool && SitEvent != null)
|
| | | {
|
| | | SitEvent(false);
|
| | | }
|
| | | CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
|
| | | if (IsCopyOfThePanel != null)
|
| | | {
|
| | |
| | | Event_Duplicates(true, CopyOfThePanelSpeed);
|
| | | }
|
| | | }
|
| | | if (!IsBossBool && !IsSitBool)
|
| | | if (!IsBossBool)
|
| | | {
|
| | | if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !inDungeon)
|
| | | {
|
| | |
| | | }
|
| | | m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
|
| | | m_BossBriefInfos.Unfold(false);
|
| | |
|
| | | if (SitEvent != null)
|
| | | {
|
| | | SitEvent(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | m_ImageRotation.DOLocalRotate(Vec3, SwitchSkillTipAndButtonTipSpeed);
|
| | |
| | | }
|
| | | else//显示默认
|
| | | {
|
| | | if (inDungeon || IsBossBool || IsSitBool || isNeutralMap)
|
| | | if (inDungeon || IsBossBool || isNeutralMap)
|
| | | {
|
| | | if (IsSitBool && SitEvent != null)
|
| | | {
|
| | | SitEvent(true);
|
| | | }
|
| | | CopyOfThePanel.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
|
| | | if (IsCopyOfThePanel != null)
|
| | | {
|
| | |
| | | Event_Duplicates(false, CopyOfThePanelSpeed);
|
| | | }
|
| | | }
|
| | | if (!IsBossBool && !IsSitBool)
|
| | | if (!IsBossBool)
|
| | | {
|
| | | if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2 && !inDungeon)
|
| | | {
|
| | |
| | | }
|
| | | m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
|
| | | m_BossBriefInfos.Unfold(false);
|
| | |
|
| | | if (SitEvent != null)
|
| | | {
|
| | | SitEvent(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
|
| | |
| | | {
|
| | | if (_unflod)
|
| | | {
|
| | | if (Vector3.Distance(m_CastSkillTip.localPosition, m_position1_S.localPosition) <= 1)
|
| | | if (Vector3.Distance(m_CastSkillTip.localPosition, m_position1_S.localPosition) <= 1)//技能面板展开状态
|
| | | {
|
| | | m_AnimationFadeOut.ImmediatelyAppear();
|
| | | m_CastSkillTip.localPosition = m_position2_S.localPosition;
|
| | | m_MailObj.SetActive(false);
|
| | | m_ImageRotation.DOLocalRotate(Vec3, SwitchSkillTipAndButtonTipSpeed);
|
| | | recordPositionBool = false;
|
| | | _MarkRay.gameObject.SetActive(true);
|
| | | ShowBtnGroup();//显示按钮组隐藏技能组(强制切换)
|
| | | }
|
| | |
|
| | | if (Vector3.Distance(m_TaskAndTeamPanel.localPosition, TaskListTipAnchor1.localPosition) > 5)
|
| | | if (Vector3.Distance(m_TaskAndTeamPanel.localPosition, TaskListTipAnchor1.localPosition) > 5)//任务面板
|
| | | {
|
| | | TaskSwithButton();
|
| | | onMainModel.IsBossAreaTask = false;
|
| | | }
|
| | | if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2)
|
| | | if (Vector3.Distance(CopyOfThePanel.position, CopyOfThePosition1.position) > 2)//上层面板
|
| | | {
|
| | | CopyOfThePanel.DOLocalMoveY(CopyOfThePosition1.localPosition.y, CopyOfThePanelSpeed);
|
| | | m_ContainerBossList.DOLocalMoveY(CopyOfThePosition2.localPosition.y, CopyOfThePanelSpeed);
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | if (Vector3.Distance(m_CastSkillTip.localPosition, m_position2_S.localPosition) <= 1)
|
| | | if (Vector3.Distance(m_CastSkillTip.localPosition, m_position2_S.localPosition) <= 1)//技能面板收起状态
|
| | | {
|
| | | m_AnimationFadeOut.FadeAtOnce();
|
| | | m_CastSkillTip.localPosition = m_position1_S.localPosition;
|
| | | m_MailObj.SetActive(true);
|
| | | m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, 0);
|
| | | m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
|
| | | recordPositionBool = true;
|
| | | _MarkRay.gameObject.SetActive(false);
|
| | | ShowCastSkill();//显示技能组,隐藏按钮组(强制切换)
|
| | | }
|
| | | m_HighSettingTip.ShowButtonNow();
|
| | | // m_HighSettingTip.ColseButtonNow();
|
| | |
|
| | | if (_skillGroup != 0)
|
| | | {
|
| | | m_SkillContainer.skillTurnplate.SwitchGroup(_skillGroup);
|
| | |
| | | {
|
| | | if (AchievementGoto.achievementType == AchievementGoto.ExcuteSkill)
|
| | | {
|
| | | if (m_AnimationFadeOut.GetIsFadeIn())
|
| | | if (Vector3.Distance(m_CastSkillTip.localPosition, m_position2_S.localPosition) <= 1)//技能面板收起状态
|
| | | {
|
| | | m_AnimationFadeOut.FadeAtOnce();
|
| | | m_CastSkillTip.localPosition = m_position1_S.localPosition;
|
| | | m_MailObj.SetActive(true);
|
| | | m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, 0);
|
| | | m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
|
| | | recordPositionBool = true;
|
| | | _MarkRay.gameObject.SetActive(false);
|
| | | ShowCastSkill();//显示技能组隐藏按钮组(强制切换)
|
| | | }
|
| | | var _cfg = Config.Instance.Get<SuccessConfig>(AchievementGoto.guideAchievementId);
|
| | | var _skillId = ModelCenter.Instance.GetModel<AchievementModel>().FindSkillByJob(_cfg.Condition, PlayerDatas.Instance.baseData.Job);
|
| | |
| | |
|
| | | public void IsShowButtonGroup()
|
| | | {
|
| | | if (Vector3.Distance(m_CastSkillTip.localPosition, m_position1_S.localPosition) <= 1)
|
| | | if (Vector3.Distance(m_CastSkillTip.localPosition, m_position1_S.localPosition) <= 1)//技能面板展示
|
| | | {
|
| | | m_AnimationFadeOut.ImmediatelyAppear();
|
| | | m_CastSkillTip.localPosition = m_position2_S.localPosition;
|
| | | m_MailObj.SetActive(false);
|
| | | m_ImageRotation.DOLocalRotate(Vec3, SwitchSkillTipAndButtonTipSpeed);
|
| | | recordPositionBool = false;
|
| | | _MarkRay.gameObject.SetActive(true);
|
| | | ShowBtnGroup();//显示按钮组隐藏技能组(强制切换)
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | private void ShowBtnGroup()//显示按钮组,隐藏技能组(强制切换)
|
| | | {
|
| | | m_AnimationFadeOut.ImmediatelyAppear();//按钮组立即出现
|
| | | m_CastSkillTip.localPosition = m_position2_S.localPosition;//技能面板切出
|
| | | m_MailObj.SetActive(false);
|
| | | m_ImageRotation.DOLocalRotate(Vec3, SwitchSkillTipAndButtonTipSpeed);
|
| | | recordPositionBool = false;
|
| | | _MarkRay.gameObject.SetActive(true);
|
| | | }
|
| | | private void ShowCastSkill()//显示技能组,隐藏按钮组(强制切换)
|
| | | {
|
| | | m_AnimationFadeOut.FadeAtOnce();//功能面板立刻隐藏
|
| | | m_CastSkillTip.localPosition = m_position1_S.localPosition;//技能面板立即出现
|
| | | m_MailObj.SetActive(true);
|
| | | m_CastSkillTip.GetComponent<CanvasGroup>().DOFade(1, 0);
|
| | | m_ImageRotation.DOLocalRotate(Vector3.zero, SwitchSkillTipAndButtonTipSpeed);
|
| | | recordPositionBool = true;
|
| | | _MarkRay.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | public int ItemID = 0;
|
| | | public int UnitPrice = 0;
|
| | | public int ItemNumber = 0;
|
| | |
|
| | | public int TaskLv = 0;//任务等级
|
| | |
|
| | | private void GetPassiveSkillTask()//获取任务数据
|
| | | {
|
| | |
| | | TaskId_Skill1.Add(TaskId_SkillInt1[i]);
|
| | | }
|
| | | int[] PassiveSkillTask = ConfigParse.GetMultipleStr<int>(PassiveSkillTaskconfig.Numerical3);
|
| | | string str4 =PassiveSkillTaskconfig.Numerical4;
|
| | | TaskLv = int.Parse(str4);
|
| | | if (PassiveSkillTask.Length >= 3)
|
| | | {
|
| | | ItemID = PassiveSkillTask[0];
|
| | | UnitPrice = PassiveSkillTask[1];
|
| | | ItemNumber = PassiveSkillTask[2];
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | |
| | | _TaskRamusList.OnRefreshCell += OnRefreshGridCell;
|
| | | playerPack.RefreshItemCountAct += RefreshItemCountAct;
|
| | | playerPack.ItemCntReduceAct += ItemCntReduceAct;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;//数据的刷新(h0418)
|
| | | OnCreateGridLineCell(_TaskRamusList);
|
| | | }
|
| | |
|
| | |
| | | _TaskRamusList.OnRefreshCell -= OnRefreshGridCell;
|
| | | playerPack.RefreshItemCountAct -= RefreshItemCountAct;
|
| | | playerPack.ItemCntReduceAct -= ItemCntReduceAct;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;//数据的刷新(h0418)
|
| | | }
|
| | |
|
| | | private void Updatefighting(PlayerDataRefresh obj)
|
| | | {
|
| | | if (obj == PlayerDataRefresh.LV)
|
| | | {
|
| | | OpenShowButton();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OpenShowButton()
|
| | | {
|
| | | if (mainModel.TaskId_Skill1.Contains(TaskIdNow))
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV >= mainModel.TaskLv)
|
| | | {
|
| | | _Btn_Forward.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | _Btn_Forward.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | private void ItemCntReduceAct(PackType arg1, int arg2, int arg3)
|
| | | {
|
| | | if (arg1 == PackType.rptItem && arg3 == mainModel.ItemID)
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | strNull = string.Format(Language.Get("PassiveSkillTask4"), needNumber, GoldPaper, needNumber- GoldPaper);
|
| | | strNull = string.Format(Language.Get("PassiveSkillTask4"), needNumber, GoldPaper, needNumber - GoldPaper);
|
| | | }
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), strNull, (bool isOk) =>
|
| | | {
|
| | | |
| | |
|
| | | if (isOk)
|
| | | {
|
| | | if (Gold + GoldPaper >= needNumber)
|
| | |
| | | }
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | } |
| | | }
|
| | | });
|
| | |
|
| | | }
|
| | |
| | | if (TaskId != TaskIdNow)
|
| | | {
|
| | | TaskIdNow = TaskId;
|
| | | OpenShowButton();
|
| | | _TaskRamusList.m_Scorller.RefreshActiveCellViews();//刷新当前可见
|
| | | }
|
| | | });
|
| | |
| | | string str = string.Empty;
|
| | | if (mainModel.TaskId_Skill1.Contains(taskID))
|
| | | {
|
| | | int itemNumber = playerPack.GetItemCountByID(PackType.rptItem, mainModel.ItemID);//获取特殊物品
|
| | | if (itemNumber >= mainModel.ItemNumber)
|
| | | if (PlayerDatas.Instance.baseData.LV >= mainModel.TaskLv)
|
| | | {
|
| | | string Str_A = string.Format(Language.Get("PassiveSkillTask1"), mainModel.ItemID, mainModel.ItemNumber);
|
| | | str = Str_A;
|
| | | int itemNumber = playerPack.GetItemCountByID(PackType.rptItem, mainModel.ItemID);//获取特殊物品
|
| | | if (itemNumber >= mainModel.ItemNumber)
|
| | | {
|
| | | string Str_A = string.Format(Language.Get("PassiveSkillTask1"), mainModel.ItemID, mainModel.ItemNumber);
|
| | | str = Str_A;
|
| | | }
|
| | | else
|
| | | {
|
| | | string Str_A = string.Format(Language.Get("PassiveSkillTask1"), mainModel.ItemID, itemNumber);
|
| | | str = Str_A;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | string Str_A = string.Format(Language.Get("PassiveSkillTask1"), mainModel.ItemID, itemNumber);
|
| | | str = Str_A;
|
| | | string Str_C = string.Format(Language.Get("PassiveSkillTask5"), mainModel.TaskLv);
|
| | | str = Str_C;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | str = Config.Instance.Get<TASKINFOConfig>(strINfor).show_writing;
|
| | | } |
| | | }
|
| | | str = WordAnalysis.Color_Start_Regex.Replace(str, string.Empty);
|
| | | str = WordAnalysis.Color_End_Regex.Replace(str, string.Empty);
|
| | | _Text_TaskTarget.text = str;//任务目标
|
| | | |
| | |
|
| | | if ((int)taskmodel.GetTaskStatus(TaskIdNow) == 3 || mainModel.TaskId_Skill1.Contains(taskID))//能够进行立即完成的支线任务
|
| | | {
|
| | | _Text_Forward.text = string.Format(Language.Get("FinishAtOnce_Z"));
|
| | |
| | | TreasureNewGotWin.CloseTreasureNewGotWinEvent += CloseTreasureNewGotWinEvent;
|
| | | playerPack.RefreshItemCountAct += RefreshItemCountAct;
|
| | | playerPack.ItemCntReduceAct += ItemCntReduceAct;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;//数据的刷新(h0418)
|
| | | OnCollectingTreasureChangeEvent(TreasureCategory.Human);
|
| | | TaskScheduling();//任务排序 1
|
| | | TheTaskToGenerate();//任务生成
|
| | |
| | | PlayerTaskDatas.MainCardLevelChange -= MainCardLevelChange;//卡级任务修改
|
| | | playerPack.RefreshItemCountAct -= RefreshItemCountAct;
|
| | | playerPack.ItemCntReduceAct -= ItemCntReduceAct;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;//数据的刷新(h0418)
|
| | | }
|
| | |
|
| | | private void Updatefighting(PlayerDataRefresh obj)//等级刷新
|
| | | {
|
| | | if (obj == PlayerDataRefresh.LV)
|
| | | {
|
| | | foreach (var key in taskmodel.SideQuestsDic.Keys)
|
| | | {
|
| | | if (mainModel.TaskId_Skill1.Contains(key))
|
| | | {
|
| | | TaskIdUpdate(key);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void ItemCntReduceAct(PackType arg1, int arg2, int arg3)
|
| | |
| | | {
|
| | | ModelCenter.Instance.GetModel<DailyQuestModel>().currentDailyQuest = (int)DailyQuestType.Trial;
|
| | | }
|
| | | if (NewBieCenter.Instance.inGuiding && NewBieCenter.Instance.currentGuide == 29)//仙界秘境功能开启引导
|
| | | {
|
| | | ModelCenter.Instance.GetModel<DailyQuestModel>().currentDailyQuest = (int)DailyQuestType.FairyLand;
|
| | | }
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<DailyQuestWin>();
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, September 21, 2017 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | |
| | | public class MarketWin : Window |
| | | { |
| | | [SerializeField] Button leftBtn; |
| | | [SerializeField] Button rightBtn; |
| | | [SerializeField] Button closeBtn; |
| | | [SerializeField] FunctionButton dealTitleBtn; |
| | | [SerializeField] FunctionButton putawayTitleBtn; |
| | | [SerializeField] FunctionButton dealRecordTitleBtn; |
| | | [SerializeField] FunctionButtonGroup buttonGroup; |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | leftBtn.onClick.AddListener(buttonGroup.TriggerLast); |
| | | rightBtn.onClick.AddListener(buttonGroup.TriggerNext); |
| | | closeBtn.onClick.AddListener(OnClose); |
| | | dealTitleBtn.onClick.AddListener(OnDeal); |
| | | putawayTitleBtn.onClick.AddListener(OnPutaway); |
| | | dealRecordTitleBtn.onClick.AddListener(OnDealRecord); |
| | | } |
| | | |
| | | private void OnDealRecord() |
| | | { |
| | | CloseChildWin(); |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<MarketDealRecordWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<MarketDealRecordWin>(); |
| | | } |
| | | functionOrder = 2; |
| | | } |
| | | |
| | | private void OnPutaway() |
| | | { |
| | | CloseChildWin(); |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<MarketPutawayWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<MarketPutawayWin>(); |
| | | } |
| | | functionOrder = 1; |
| | | } |
| | | |
| | | private void OnDeal() |
| | | { |
| | | CloseChildWin(); |
| | | if (windowState == WindowState.Opened) |
| | | { |
| | | WindowCenter.Instance.OpenWithoutAnimation<MarketDealWin>(); |
| | | } |
| | | else |
| | | { |
| | | WindowCenter.Instance.Open<MarketDealWin>(); |
| | | } |
| | | functionOrder = 0; |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | CloseChildWin(); |
| | | } |
| | | |
| | | protected override void OnActived() |
| | | { |
| | | base.OnActived(); |
| | | buttonGroup.TriggerByOrder(functionOrder); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | CloseChildWin(); |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | WindowCenter.Instance.Open<MainInterfaceWin>(); |
| | | } |
| | | #endregion |
| | | private void OnClose() |
| | | { |
| | | CloseChildWin(); |
| | | CloseImmediately(); |
| | | |
| | | } |
| | | private void CloseChildWin() |
| | | { |
| | | if (WindowCenter.Instance.CheckOpen<MarketDealWin>()) { |
| | | WindowCenter.Instance.CloseImmediately<MarketDealWin>(); |
| | | } |
| | | if (WindowCenter.Instance.CheckOpen<MarketPutawayWin>()) { |
| | | WindowCenter.Instance.CloseImmediately<MarketPutawayWin>(); |
| | | } |
| | | if (WindowCenter.Instance.CheckOpen<MarketDealRecordWin>()) { |
| | | WindowCenter.Instance.CloseImmediately<MarketDealRecordWin>(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Thursday, September 21, 2017
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI {
|
| | |
|
| | | public class MarketWin : Window
|
| | | {
|
| | | [SerializeField] Button leftBtn;
|
| | | [SerializeField] Button rightBtn;
|
| | | [SerializeField] Button closeBtn;
|
| | | [SerializeField] FunctionButton dealTitleBtn;
|
| | | [SerializeField] FunctionButton putawayTitleBtn;
|
| | | [SerializeField] FunctionButton dealRecordTitleBtn;
|
| | | [SerializeField] FunctionButtonGroup buttonGroup;
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | leftBtn.onClick.AddListener(buttonGroup.TriggerLast);
|
| | | rightBtn.onClick.AddListener(buttonGroup.TriggerNext);
|
| | | closeBtn.onClick.AddListener(OnClose);
|
| | | dealTitleBtn.onClick.AddListener(OnDeal);
|
| | | putawayTitleBtn.onClick.AddListener(OnPutaway);
|
| | | dealRecordTitleBtn.onClick.AddListener(OnDealRecord);
|
| | | }
|
| | |
|
| | | private void OnDealRecord()
|
| | | {
|
| | | CloseChildWin();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<MarketDealRecordWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<MarketDealRecordWin>();
|
| | | }
|
| | | functionOrder = 2;
|
| | | }
|
| | |
|
| | | private void OnPutaway()
|
| | | {
|
| | | CloseChildWin();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<MarketPutawayWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<MarketPutawayWin>();
|
| | | }
|
| | | functionOrder = 1;
|
| | | }
|
| | |
|
| | | private void OnDeal()
|
| | | {
|
| | | CloseChildWin();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<MarketDealWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<MarketDealWin>();
|
| | | }
|
| | | functionOrder = 0;
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | CloseChildWin();
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | buttonGroup.TriggerByOrder(functionOrder);
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | CloseChildWin();
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | | #endregion
|
| | | private void OnClose()
|
| | | {
|
| | | CloseChildWin();
|
| | | CloseImmediately();
|
| | | |
| | | }
|
| | | private void CloseChildWin()
|
| | | {
|
| | | if (WindowCenter.Instance.CheckOpen<MarketDealWin>()) {
|
| | | WindowCenter.Instance.CloseImmediately<MarketDealWin>();
|
| | | }
|
| | | if (WindowCenter.Instance.CheckOpen<MarketPutawayWin>()) {
|
| | | WindowCenter.Instance.CloseImmediately<MarketPutawayWin>();
|
| | | }
|
| | | if (WindowCenter.Instance.CheckOpen<MarketDealRecordWin>()) {
|
| | | WindowCenter.Instance.CloseImmediately<MarketDealRecordWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
| | | {
|
| | | get
|
| | | {
|
| | | if (font == null)
|
| | | if (font == null && Application.isPlaying)
|
| | | {
|
| | | font = FontUtility.preferred;
|
| | | }
|
| | |
| | | {
|
| | | get
|
| | | {
|
| | | if (font == null)
|
| | | if (font == null && Application.isPlaying)
|
| | | {
|
| | | font = FontUtility.preferred;
|
| | | }
|
| | |
| | | fitterText = fitterText.Replace("\n", "");
|
| | | float width = 0;
|
| | | textBuilder.Length = 0;
|
| | | if (null == font)
|
| | | if (null == font && Application.isPlaying)
|
| | | {
|
| | | font = FontUtility.preferred;
|
| | | }
|
| | |
| | | private void Awake()
|
| | | {
|
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += BeforePlayerDataInitializeEvent;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | }
|
| | |
|
| | | protected override void OnDestroy()
|
| | | {
|
| | | base.OnDestroy();
|
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= BeforePlayerDataInitializeEvent;
|
| | | StageManager.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | }
|
| | |
|
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | ServerTipDetails.OnStageLoadFinish();
|
| | | }
|
| | |
|
| | | private void BeforePlayerDataInitializeEvent()
|
| | |
| | | public bool CanGetAward(int _type, out int _displayIndex)
|
| | | {
|
| | | _displayIndex = 0;
|
| | | if (IsMissImpactRank(_type) || !IsActivityClose(_type))
|
| | | bool _locked = IsLock(_type);
|
| | | if (IsMissImpactRank(_type) || _locked)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | else if (IsActivityClose(_type))
|
| | | {
|
| | | var _start = (_cfg as OSCBillRankAwardConfig).RankA;
|
| | | var _end = (_cfg as OSCBillRankAwardConfig).RankB;
|
| | |
| | | [SerializeField] Text m_OriginalMoneyValue;
|
| | | [SerializeField] Button m_BuyBtn;
|
| | | [SerializeField] Image m_Complete;
|
| | | [SerializeField] Text m_OwnMoney;
|
| | |
|
| | | StoreModel m_StoreModel;
|
| | | StoreModel storeModel
|
| | |
| | | private void OnEnable()
|
| | | {
|
| | | storeModel.RefreshBuyShopLimitEvent += RefreshBuyShopLimitEvent;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
|
| | | }
|
| | |
|
| | | private void OnDisable()
|
| | | {
|
| | | storeModel.RefreshBuyShopLimitEvent -= RefreshBuyShopLimitEvent;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= PlayerDataRefreshInfoEvent;
|
| | | }
|
| | |
|
| | | private void PlayerDataRefreshInfoEvent(PlayerDataRefresh refreshType)
|
| | | {
|
| | | if (refreshType == PlayerDataRefresh.Gold || refreshType == PlayerDataRefresh.GoldPaper)
|
| | | {
|
| | | DisplayOwnMoney();
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshBuyShopLimitEvent()
|
| | |
| | | m_OriginalMoneyValue.text = _storeConfig.MoneyOriginal.ToString();
|
| | | }
|
| | |
|
| | | DisplayOwnMoney();
|
| | |
|
| | | var _limit = storeModel.GetBuyShopLimit((uint)storeId);
|
| | | m_Complete.gameObject.SetActive(_limit != null && _limit.BuyCnt >= _storeConfig.PurchaseNumber[0]);
|
| | | m_BuyBtn.gameObject.SetActive(_limit == null || _limit.BuyCnt < _storeConfig.PurchaseNumber[0]);
|
| | | }
|
| | |
|
| | | private void DisplayOwnMoney()
|
| | | {
|
| | | if (m_OwnMoney != null)
|
| | | {
|
| | | var config = Config.Instance.Get<StoreConfig>(storeId);
|
| | | m_OwnMoney.text = UIHelper.GetMoneyCnt(config == null ? 1 : config.MoneyType).ToString();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnBuyBtn()
|
| | | {
|
| | | var _storeConfig = Config.Instance.Get<StoreConfig>(storeId);
|
| | |
| | | {
|
| | | onStateUpate(6);
|
| | | }
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | | public event Action<int> onStateUpate;
|
| | |
|
| | | public bool activate { get; private set; }
|
| | |
|
| | | private bool m_GiftGetNotify = false;
|
| | | public bool giftGetNotify
|
| | | {
|
| | | get { return m_GiftGetNotify; }
|
| | | set
|
| | | {
|
| | | m_GiftGetNotify = value;
|
| | | OSGiftRedpoint.state = value ? RedPointState.Simple : RedPointState.None;
|
| | | }
|
| | | }
|
| | |
|
| | | StoreModel storeModel
|
| | | {
|
| | |
| | | {
|
| | | onStateUpate(6);
|
| | | }
|
| | | UpdateRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | onStateUpate(6);
|
| | | }
|
| | | }
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | | public bool CheckActivate()
|
| | |
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | giftGetNotify = false;
|
| | | }
|
| | | |
| | | public void SetDayRemind()
|
| | | {
|
| | | if (OSGiftRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | DayRemind.Instance.SetDayRemind(DayRemind.OSGIFT_REDPOINT, true);
|
| | | UpdateRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | void UpdateRedpoint()
|
| | | {
|
| | | OSGiftRedpoint.state = RedPointState.None;
|
| | | if (CheckActivate() && !DayRemind.Instance.GetDayRemind(DayRemind.OSGIFT_REDPOINT))
|
| | | {
|
| | | OSGiftRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | | }
|
| | |
|
| | | public Redpoint OSGiftRedpoint = new Redpoint(MainRedDot.REDPOINT_OPENSERVER, 20906);
|
| | |
| | | {
|
| | | m_ActivitySpreadDict[m_SortArray[i]] = false;
|
| | | }
|
| | | impactRankModel.presentSelectType = impactRankModel.GetDefaultSelectType();
|
| | | var impactDefaultType= impactRankModel.GetDefaultSelectType();
|
| | | if (impactRankModel.IsLock(impactDefaultType))
|
| | | {
|
| | | impactDefaultType = impactRankModel.billRankCfgDict.Keys.First();
|
| | | }
|
| | | impactRankModel.presentSelectType = impactDefaultType;
|
| | | impactRankModel.gotoImpactRankType = 0;
|
| | | envelopeModel.selectType = 1;
|
| | | CheckAlreadyOpen();
|
| | |
| | | OperationTimeHepler.Instance.operationTimeUpdateEvent -= OperationTimeUpdateEvent;
|
| | | OpenServerActivityCenter.Instance.openServerActivityStateChange -= OpenServerActivityStateChange;
|
| | | CloseOtherWin();
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | impactRankModel.gotoImpactRankType = 0;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | int GetDefaultSelect()
|
| | |
| | |
|
| | | private void OnStepServerDayEvent()
|
| | | {
|
| | | m_ActivityCtrl.m_Scorller.RefreshActiveCellViews();
|
| | | //m_ActivityCtrl.m_Scorller.RefreshActiveCellViews();
|
| | | UpdateFunctionBtns();
|
| | | }
|
| | |
|
| | | private void RefreshActivityTypeCell(OpenActivityRankTypeCell _cell)
|
| | |
| | | }
|
| | | foreach (var _type in impactRankModel.billRankCfgDict.Keys)
|
| | | {
|
| | | if (impactRankModel.IsLock(_type))
|
| | | {
|
| | | continue;
|
| | | }
|
| | | m_ActivityCtrl.AddCell(ScrollerDataType.Normal, sort * 100 + _type);
|
| | | }
|
| | | break;
|
| | |
| | | return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<StoreModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | OSGiftModel giftModel { get { return ModelCenter.Instance.GetModel<OSGiftModel>(); } }
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | | {
|
| | | WindowCenter.Instance.windowAfterOpenEvent += WindowAfterOpenEvent;
|
| | | WindowCenter.Instance.windowAfterCloseEvent += windowAfterCloseEvent;
|
| | | ModelCenter.Instance.GetModel<OSGiftModel>().giftGetNotify = false;
|
| | | model.RefreshBuyShopLimitEvent += RefreshBuyShopLimitEvent;
|
| | |
|
| | | giftModel.SetDayRemind();
|
| | | Display();
|
| | |
|
| | | m_ContainerDisplay.gameObject.SetActive(!WindowCenter.Instance.CheckOpen<OffLineOnHookWin>());
|
| | |
| | | private void OnCloseClick()
|
| | | {
|
| | | CloseImmediately();
|
| | | if (!WindowCenter.Instance.CheckOpen<MainInterfaceWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | CloseChild();
|
| | | WindowCenter.Instance.CloseImmediately<PetWin>();
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | |
|
| | | protected override void BindController()
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | |
| | | {
|
| | | FuncConfigConfig funcConfig = Config.Instance.Get<FuncConfigConfig>("RebornArguments");
|
| | | dungeonKillArray = ConfigParse.GetMultipleStr<int>(funcConfig.Numerical2);
|
| | | RebornConditions = ConfigParse.GetMultipleStr<int>(funcConfig.Numerical1);
|
| | | FuncConfigConfig RebornTime = Config.Instance.Get<FuncConfigConfig>("DuplicatesRebornTime");
|
| | | duplicatesRebornDict = ConfigParse.GetDic<int, int>(RebornTime.Numerical1);
|
| | | SysNotifyMgr.Instance.sysNotifyEvent += RefreshPlayerDieInfo;
|
| | | }
|
| | |
|
| | |
| | | if (_tagMapModel.MapFBType == 0)
|
| | | {
|
| | | IsCanReborn = true;
|
| | | _tagfuncModel = Config.Instance.Get<FuncConfigConfig>("RebornArguments");
|
| | | RebornConditions = ConfigParse.GetMultipleStr<int>(_tagfuncModel.Numerical1);
|
| | | rebornTiredNum = RebornConditions[0];
|
| | | rebornPrice = RebornConditions[2];
|
| | | //isBossKill = StatusManager.Instance.IsExist((int)playerId,20022);
|
| | |
| | | if (_dungeonOpenTimeModel.DeathTime == 1)
|
| | | {
|
| | | IsCanReborn = true;
|
| | | _tagfuncModel = Config.Instance.Get<FuncConfigConfig>("DuplicatesRebornTime");
|
| | | duplicatesRebornDict = ConfigParse.GetDic<int, int>(_tagfuncModel.Numerical1);
|
| | | if (!duplicatesRebornDict.ContainsKey(PlayerDatas.Instance.baseData.MapID))
|
| | | {
|
| | | this.duplicatesRebornTime = duplicatesRebornDict[0];
|
| | |
| | |
|
| | | public void RefreshDeadModel(HB103_tagMCPlayerDeadTime data)
|
| | | {
|
| | |
|
| | | if (data.DeadTime == 0)
|
| | | return;
|
| | |
|
| | | _tagfuncModel = Config.Instance.Get<FuncConfigConfig>("RebornArguments");
|
| | | RebornConditions = ConfigParse.GetMultipleStr<int>(_tagfuncModel.Numerical1);
|
| | | double timeOffest = GetTimeOffest(TimeUtility.GetTime(data.DeadTime));
|
| | | if (timeOffest <= RebornConditions[1])
|
| | | {
|
| | |
| | | WindowCenter.Instance.CloseImmediately<RebornWin>();
|
| | | WindowCenter.Instance.CloseImmediately<ReliveWin>();
|
| | | WindowCenter.Instance.CloseImmediately<RebornTiredWin>();
|
| | | WindowCenter.Instance.CloseImmediately<ElderGodAreaRebornWin>();
|
| | |
|
| | | if (CloseRebornWinEvent != null)
|
| | | {
|
| | |
| | | protected override void OnAfterClose()
|
| | | {
|
| | | PlayerDatas.Instance.rank.OnRefreshRank -= OnRefreshRankList;
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | [SerializeField, Header("下一境界位置")] Vector3[] m_RealmNextwPositions;
|
| | | [SerializeField, Header("Boss位置")] Vector3[] m_BossPositions;
|
| | | [SerializeField, Header("Boss出现延长")] float m_DelayEnterTime = 1f;
|
| | |
|
| | | [SerializeField, Header("出场总时长")] float m_BossEnterDuration = 3f;
|
| | | int cacheRealmPoint = 0;
|
| | | Coroutine cacheCoroutine = null;
|
| | | const string State_EnterHash = "Show";
|
| | | const string State_IdleHash = "Idle";
|
| | | DateTime overdueTime = DateTime.Now;
|
| | |
|
| | | RealmModel realmModel { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
|
| | |
|
| | |
|
| | |
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | | cacheRealmPoint = PlayerDatas.Instance.extersion.realmPoint;
|
| | | m_RawBoss.gameObject.SetActive(false);
|
| | | m_RawPlayer.gameObject.SetActive(false);
|
| | | overdueTime = DateTime.Now;
|
| | | Display();
|
| | | }
|
| | |
|
| | |
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | HandleAchievement();
|
| | | if (realmModel.openByDungeonStep)
|
| | | if (realmModel.openByDungeonStep && !realmModel.realmDungeonState)
|
| | | {
|
| | | m_RawBoss.gameObject.SetActive(false);
|
| | | m_RawPlayer.gameObject.SetActive(false);
|
| | |
| | | if (realmModel.realmDungeonState)
|
| | | {
|
| | | m_RealmDungeonSfx.Play();
|
| | | overdueTime = DateTime.Now.AddSeconds(m_BossEnterDuration);
|
| | | StartCoroutine(Co_DisplayBossShow());
|
| | | }
|
| | | realmModel.realmDungeonState = false;
|
| | |
| | | var config = Config.Instance.Get<RealmConfig>(PlayerDatas.Instance.baseData.realmLevel);
|
| | | if (_realmPoint >= config.NeedPoint)
|
| | | {
|
| | | if (DateTime.Now < overdueTime)
|
| | | {
|
| | | return;
|
| | | }
|
| | | PlayerDatas.Instance.realm.realmHelpList.Clear();
|
| | | if (config.IsBigRealm == 1)
|
| | | {
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnRefreshPlayerInfo;
|
| | | titleModel.OnRefreshGainTitle -= OnRefreshTitle;
|
| | | PlayerDatas.Instance.OnRoleAttrRefresh -= OnRefreshWorldLv;
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | PlayerDatas.Instance.RefreshPlayerInfoEvent -= RefreshPlayerInfoEvent;
|
| | | CloseChild();
|
| | | }
|
| | |
| | | protected override void OnAfterClose()
|
| | | {
|
| | | CloseChild();
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | | #endregion
|
| | | private void OnResource()
|
| | |
| | | [SerializeField] Text presentRuneNameTxt;
|
| | | [SerializeField] Text presentRuneAttrTxt;
|
| | |
|
| | | [SerializeField] RectTransform m_ContainerLevelUp;
|
| | | //[SerializeField] RectTransform m_ContainerLevelUp;
|
| | | [SerializeField] RectTransform m_ContainerLvUp1;
|
| | | [SerializeField] RectTransform m_ContainerLvUp2;
|
| | | [SerializeField] RectTransform m_ContainerItem;
|
| | | [SerializeField] RectTransform m_ContaienrMaxLevel;
|
| | | [SerializeField] Text runeLevelUpAttr1;
|
| | | [SerializeField] Text runeLevelUpAttr2;
|
| | | [SerializeField] Text runeLevelUpAttrNum1;
|
| | |
| | | m_ContainerLvUp1.gameObject.SetActive(!_isRuneMaxLv);
|
| | | m_ContainerItem.gameObject.SetActive(!_isRuneMaxLv);
|
| | | m_RuneLevelUpBtn.gameObject.SetActive(!_isRuneMaxLv);
|
| | | m_ContainerLevelUp.gameObject.SetActive(!_isRuneMaxLv);
|
| | | //m_ContainerLevelUp.gameObject.SetActive(!_isRuneMaxLv);
|
| | | m_ContaienrMaxLevel.gameObject.SetActive(_isRuneMaxLv);
|
| | | runeLevelUpItemNum.text = StringUtility.Contact(UIHelper.GetTextColorByItemColor(
|
| | | model.RuneSplinters >= _levelUpExp ? TextColType.Green : TextColType.Red
|
| | | , model.RuneSplinters.ToString(), true), "/", _levelUpExp);
|
| | |
| | | }
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | private void CloseChild()
|
| | |
| | | m_RuneIcon.SetSprite(itemConfig.IconKey);
|
| | | var runeType = Language.Get(StringUtility.Contact("RuneType_", itemConfig.Effect1));
|
| | | m_UnLockType.text = Language.Get("RuneTower15", runeType);
|
| | | m_RuneEffect1.text = Language.Get("RuneTypeDesc_", itemConfig.Effect1);
|
| | | m_RuneEffect1.text = Language.Get(StringUtility.Contact("RuneTypeDesc_", itemConfig.Effect1));
|
| | |
|
| | | autoCloseTime = Time.time + 10;
|
| | | m_CoolDown.text = Language.Get("RuneTower9", 10);
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | |
| | | public override void CloseClick()
|
| | | {
|
| | | base.CloseClick();
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | {
|
| | | ParseConfig();
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | PlayerTaskDatas.Event_TaskInformation += TaskInformationUpdate;
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
|
| | | PlayerTaskDatas.Event_TaskInformation -= TaskInformationUpdate;
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | | equipPassSkills.Clear();
|
| | | playerLoginOk = false;
|
| | | equipPassPage = false;
|
| | | taskHoleCondition = 0;
|
| | | }
|
| | |
|
| | | #region 配置
|
| | |
| | | passSkillLimits.Add(limit);
|
| | | }
|
| | | passEquipCnt = int.Parse(funcCfg.Numerical2);
|
| | | taskHoleDict = ConfigParse.GetDic<int, int>(funcCfg.Numerical4);
|
| | | }
|
| | | funcCfg = Config.Instance.Get<FuncConfigConfig>("PassSkillEquipGetWay");
|
| | | if (funcCfg != null)
|
| | |
| | | public int presentEquipPage { get; private set; }
|
| | | public bool playerLoginOk = false;
|
| | | private Dictionary<int, Dictionary<int, int>> equipPassSkills = new Dictionary<int, Dictionary<int, int>>();
|
| | | public Dictionary<int, int> taskHoleDict { get; private set; }
|
| | | public event Action UpdatePassEquipSkillEvent;
|
| | | public bool equipPassPage { get; set; }
|
| | | public bool TryGetEquipPassSkills(int page, int hole, out int _skillId)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public event Action taskUnlockUpdate;
|
| | |
|
| | | public int taskHoleCondition { get; private set; }
|
| | |
|
| | | public const string TASKHOLEKEY = "OpenSkillSlots";
|
| | |
|
| | | public int UnlockPassHole
|
| | | {
|
| | | get { return LocalSave.GetInt(StringUtility.Contact(TASKHOLEKEY, "_", PlayerDatas.Instance.baseData.PlayerID)); }
|
| | | set { LocalSave.SetInt(StringUtility.Contact(TASKHOLEKEY, "_", PlayerDatas.Instance.baseData.PlayerID), value); }
|
| | | }
|
| | |
|
| | | public bool IsTaskHoleUnlock(int condition)
|
| | | {
|
| | | if (task._DicTaskInformation.ContainsKey(1)
|
| | | && task._DicTaskInformation[1].ContainsKey(TASKHOLEKEY))
|
| | | {
|
| | | var value = 0;
|
| | | int.TryParse(task._DicTaskInformation[1][TASKHOLEKEY], out value);
|
| | | return value >= condition;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | private void TaskInformationUpdate(int _id, Dictionary<int, Dictionary<string, string>> _Dic)
|
| | | {
|
| | | if (_Dic != null && _Dic.ContainsKey(1))
|
| | | {
|
| | | var dict = _Dic[1];
|
| | | if (dict.ContainsKey(TASKHOLEKEY))
|
| | | {
|
| | | var result = 0;
|
| | | int.TryParse(dict[TASKHOLEKEY], out result);
|
| | | if (result != taskHoleCondition && playerLoginOk)
|
| | | {
|
| | | UnlockPassHole = result;
|
| | | if (taskUnlockUpdate != null)
|
| | | {
|
| | | taskUnlockUpdate();
|
| | | }
|
| | | }
|
| | | taskHoleCondition = result;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | RolePromoteModel m_PromoteModel;
|
| | | RolePromoteModel promoteModel
|
| | | {
|
| | |
| | | return m_PromoteModel ?? (m_PromoteModel = ModelCenter.Instance.GetModel<RolePromoteModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | PlayerTaskDatas task { get { return ModelCenter.Instance.GetModel<PlayerTaskDatas>(); } }
|
| | |
|
| | | public void SendEquipPassSkill(int _page, int _index, int _skillId)
|
| | | {
|
| | |
| | | else if (limit.MountLv > 0)
|
| | | {
|
| | | if (promoteModel.GetMountTotallv() < limit.MountLv)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | | else if (limit.OpenSkillSlots > 0)
|
| | | {
|
| | | if (!IsTaskHoleUnlock(limit.OpenSkillSlots))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
| | | public int level;
|
| | | public int vipLv;
|
| | | public int MountLv;
|
| | | public int OpenSkillSlots;
|
| | | }
|
| | |
|
| | | [Serializable]
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | void OnClose()
|
| | |
| | | [SerializeField] Button m_LeftBtn;
|
| | | [SerializeField] Button m_RightBtn;
|
| | | [SerializeField] List<SkillCell> equipPassSkills = new List<SkillCell>();
|
| | | [SerializeField] List<UIEffect> equipPassEffects = new List<UIEffect>();
|
| | | [SerializeField] Image m_DragImg;
|
| | | [SerializeField] Image m_DragSkillImg;
|
| | | [SerializeField] List<Button> m_PageBtns = new List<Button>();
|
| | |
| | | [SerializeField] ScrollerController scrollerController;
|
| | | [SerializeField] RectTransform m_ContainerGetWay;
|
| | | [SerializeField] ClickScreenOtherSpace clickOtherSpace;
|
| | | [SerializeField, Header("特效时长")] float m_EffectDuration = 1f;
|
| | | private List<SkillConfig> skillListPass = new List<SkillConfig>();
|
| | | private int presentSltEquipIndex = -1;
|
| | | Coroutine cacheCoroutine = null;
|
| | | SkillModel m_Model;
|
| | | SkillModel model
|
| | | {
|
| | |
| | | return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<SkillModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | PlayerTaskDatas task { get { return ModelCenter.Instance.GetModel<PlayerTaskDatas>(); } }
|
| | |
|
| | | RolePromoteModel m_PromoteModel;
|
| | | RolePromoteModel promoteModel
|
| | |
| | | UpdateEquipPassSkill();
|
| | | SetEquipHoleSelect(GetEquipHoleIndex(model.presentSltSkillID));
|
| | | DayRemind.Instance.SetDayRemind(DayRemind.PASS_SKILL_REDPOINT, true);
|
| | |
|
| | | if (cacheCoroutine != null)
|
| | | {
|
| | | StopCoroutine(cacheCoroutine);
|
| | | cacheCoroutine = null;
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | |
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | DisplayEffect();
|
| | | model.taskUnlockUpdate += TaskUnlockUpdate;
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | |
| | | model.OnRefreshSltSkill -= OnRefreshSltSkill;
|
| | | model.UpdatePassEquipSkillEvent -= UpdatePassEquipSkillEvent;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnRefreshPlayerInfo;
|
| | | model.taskUnlockUpdate -= TaskUnlockUpdate;
|
| | | model.SetDayRemind();
|
| | | model.UnlockPassHole = 0;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | model.SendEquipPage();
|
| | | }
|
| | |
|
| | | private void TaskUnlockUpdate()
|
| | | {
|
| | | DisplayEffect();
|
| | | }
|
| | |
|
| | | void DisplayEffect()
|
| | | {
|
| | | if (model.UnlockPassHole != 0)
|
| | | {
|
| | | var index = 0;
|
| | | for (int i = 0; i < equipPassSkills.Count; i++)
|
| | | {
|
| | | PassSkillLimit limit;
|
| | | if (model.TryGetPassSkillLimit(i, out limit))
|
| | | {
|
| | | if (limit.OpenSkillSlots != 0 && limit.OpenSkillSlots == model.UnlockPassHole)
|
| | | {
|
| | | index = i;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | model.UnlockPassHole = 0;
|
| | | if (index >= 0 && index < equipPassEffects.Count)
|
| | | {
|
| | | equipPassEffects[index].Play();
|
| | | cacheCoroutine = StartCoroutine(Co_UnlockEffectComplete());
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | IEnumerator Co_UnlockEffectComplete()
|
| | | {
|
| | | var duration = m_EffectDuration > 0f ? m_EffectDuration : 1.0f;
|
| | | yield return WaitingForSecondConst.GetWaitForSeconds(duration);
|
| | | SysNotifyMgr.Instance.ShowTip("PassNewHole");
|
| | | UpdateEquipPassSkill();
|
| | | }
|
| | |
|
| | | protected override void LateUpdate()
|
| | |
| | | else if (_limit.MountLv > 0 && promoteModel.GetMountTotallv() < _limit.MountLv)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | else if (_limit.OpenSkillSlots > 0 && !model.IsTaskHoleUnlock(_limit.OpenSkillSlots))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | | return false;
|
| | |
| | | continue;
|
| | | }
|
| | | }
|
| | | else if (limit.OpenSkillSlots > 0)
|
| | | {
|
| | | if (!model.IsTaskHoleUnlock(limit.OpenSkillSlots) || model.UnlockPassHole == limit.OpenSkillSlots)
|
| | | {
|
| | | SetEquipSkillDeActive(i);
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.color = equipHoleLimitColor;
|
| | | var taskName = string.Empty;
|
| | | if (model.taskHoleDict.ContainsKey(limit.OpenSkillSlots))
|
| | | {
|
| | | var taskConfig = Config.Instance.Get<PyTaskConfig>(model.taskHoleDict[limit.OpenSkillSlots]);
|
| | | if (taskConfig != null)
|
| | | {
|
| | | var taskInfoConfig = Config.Instance.Get<TASKINFOConfig>(taskConfig.name);
|
| | | taskName = taskInfoConfig == null ? string.Empty : taskInfoConfig.show_writing;
|
| | | }
|
| | | }
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text = Language.Get("PassSkillHoleLimitTask", taskName);
|
| | | continue;
|
| | | }
|
| | | }
|
| | | }
|
| | | int _skillId = 0;
|
| | | equipPassSkills[i].skillData.m_SkillNameTxt.text = string.Empty;
|
| | |
| | | m_GetWayBtn.gameObject.SetActive(true);
|
| | | }
|
| | | }
|
| | | else if (limit.OpenSkillSlots > 0)
|
| | | {
|
| | | if (!model.IsTaskHoleUnlock(limit.OpenSkillSlots))
|
| | | {
|
| | | var taskName = string.Empty;
|
| | | if (model.taskHoleDict.ContainsKey(limit.OpenSkillSlots))
|
| | | {
|
| | | var taskConfig = Config.Instance.Get<PyTaskConfig>(model.taskHoleDict[limit.OpenSkillSlots]);
|
| | | if (taskConfig != null)
|
| | | {
|
| | | var taskInfoConfig = Config.Instance.Get<TASKINFOConfig>(taskConfig.name);
|
| | | taskName = taskInfoConfig == null ? string.Empty : taskInfoConfig.show_writing;
|
| | | }
|
| | | }
|
| | | SysNotifyMgr.Instance.ShowTip("PassEquipLimitTask", taskName);
|
| | | m_GetWayBtn.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | public class CoroutineMgr : SingletonMonobehaviour<CoroutineMgr>
|
| | | {
|
| | | public event Action MaininterCDTimeEvent;//主界面CD时间
|
| | | public event Action MainHighTipCdTimeEvent;//主界面上层切换CD时间
|
| | |
|
| | | public void OnMainStartCorUp(float _waitingTime)//顶层面板切换协程开启
|
| | |
| | | _ControlBoolA = false;
|
| | | StopCoroutine("TheUpperPanel");
|
| | | }
|
| | |
|
| | | IEnumerator SwitchPanel(float _waitingTime)//用于主界面的面板切换
|
| | | {
|
| | | if (NewBieCenter.Instance.inGuiding)
|
| | | {
|
| | | yield break;
|
| | | }
|
| | |
|
| | | yield return new WaitForSeconds(_waitingTime);
|
| | |
|
| | | if (MaininterCDTimeEvent != null)
|
| | | {
|
| | | MaininterCDTimeEvent();
|
| | | }
|
| | |
|
| | | WindowCenter.Instance.Get<MainInterfaceWin>().MarkRayButton();
|
| | | }
|
| | |
|
| | | bool _ControlBoolA = false;
|
| | | IEnumerator TheUpperPanel(float _waitingTime)//用于主界面的顶层切换
|
| | | {
|
| | |
| | | DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } } |
| | | private Dictionary<int, int> QualityLimit = new Dictionary<int, int>();
|
| | | PlayerPackModel _playerPack;
|
| | | PlayerPackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } } |
| | | PlayerPackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } }
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel { get { return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>()); } }
|
| | | private int GodBeastNumber=0;//神兽编号 |
| | | private int GodBeastPart = 0;//神兽装备ID |
| | | |
| | |
| | | {
|
| | | if (itemModel[i].EquipPlace == GodBeastPart)
|
| | | {
|
| | | ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0, 1);
|
| | | ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0, itemModel[i].itemInfo.IsBind);
|
| | | m_ItemCell.Init(ItemModel);
|
| | | m_ItemCell.cellBtn.RemoveAllListeners();
|
| | | int type = i;
|
| | | m_ItemCell.cellBtn.AddListener(()=> |
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.rptDogzEquip, itemModel[type].itemInfo.ItemGUID);
|
| | | });
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if (itemModel[i].EquipPlace == godBeastPart)
|
| | | {
|
| | | ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0, 1);
|
| | | ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0, itemModel[i].itemInfo.IsBind);
|
| | | m_itemCell.Init(ItemModel);
|
| | | var itemConfig = Config.Instance.Get<ItemConfig>(itemModel[i].itemId);
|
| | | var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | private void CloseWin()
|
| | | {
|
| | | CloseImmediately();
|
| | |
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
| | | [SerializeField] Toggle m_HighQuality;
|
| | | [SerializeField] Toggle m_MediumQuality;
|
| | | [SerializeField] Toggle m_LowQuality;
|
| | | [SerializeField] OnOffToggle m_SixtyFrame;
|
| | |
|
| | | [SerializeField] Toggle m_OtherPlayer;
|
| | | [SerializeField] Toggle m_Monster;
|
| | |
| | | m_HighQuality.AddListener(OnSetQualityHigh);
|
| | | m_MediumQuality.AddListener(OnSetQualityMedium);
|
| | | m_LowQuality.AddListener(OnSetQualityLow);
|
| | | m_SixtyFrame.AddListener(SwitchGameFrame);
|
| | |
|
| | | m_OtherPlayer.AddListener(OnShowOrHideOtherPlayers);
|
| | | m_Monster.AddListener(OnShowOrHideMonsters);
|
| | |
|
| | |
| | | UpdateToggleSkin(m_LowQuality);
|
| | | UpdateToggleSkin(m_OtherPlayer);
|
| | | UpdateToggleSkin(m_Monster);
|
| | |
|
| | | m_SixtyFrame.isOn = SystemSetting.Instance.GetGameFrame() == GameFrame.FullFrame;
|
| | |
|
| | | var serverName = ServerListCenter.Instance.GetServerData(ServerListCenter.Instance.currentServer.region_flag).name;
|
| | | var playerAccount = PlayerDatas.Instance.baseData.AccID.Split('@');
|
| | |
| | |
|
| | | loginModel.accountBindOkEvent += UpdateAccountBindTitle;
|
| | | SDKUtility.Instance.onFreePlatfromDoIDAuthenticationOk += OnAuthenticationOk;
|
| | | SystemSetting.Instance.gameFrameChangeEvent += OnSwitchGameFrame;
|
| | | SystemSetting.Instance.playerSyncCountChangeEvent += OnPlayerSyncCountChange;
|
| | |
|
| | | isInited = true;
|
| | |
| | | isInited = false;
|
| | | loginModel.accountBindOkEvent -= UpdateAccountBindTitle;
|
| | | SDKUtility.Instance.onFreePlatfromDoIDAuthenticationOk -= OnAuthenticationOk;
|
| | | SystemSetting.Instance.gameFrameChangeEvent -= OnSwitchGameFrame;
|
| | | SystemSetting.Instance.playerSyncCountChangeEvent -= OnPlayerSyncCountChange;
|
| | | SystemSetting.Instance.SetPlayerSyncCount(playerSyncCountRef);
|
| | | }
|
| | |
| | | SystemSetting.Instance.SetQualityLevel(GameQuality.Low);
|
| | | if (isInited)
|
| | | {
|
| | | SystemSetting.Instance.SetGameFrame(GameFrame.HalfFrame);
|
| | | SystemSetting.Instance.SetPlayerSyncCount(5);
|
| | | }
|
| | | }
|
| | |
| | | UpdateToggleSkin(m_LowQuality);
|
| | | }
|
| | |
|
| | | private void SwitchGameFrame()
|
| | | {
|
| | | var gameFrame = SystemSetting.Instance.GetGameFrame();
|
| | |
|
| | | if (gameFrame==GameFrame.HalfFrame)
|
| | | {
|
| | | SystemSetting.Instance.SetGameFrame(GameFrame.FullFrame);
|
| | | }
|
| | | else
|
| | | {
|
| | | SystemSetting.Instance.SetGameFrame(GameFrame.HalfFrame);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnSwitchGameFrame()
|
| | | {
|
| | | m_SixtyFrame.isOn = SystemSetting.Instance.GetGameFrame() == GameFrame.FullFrame;
|
| | | }
|
| | |
|
| | | private void OnShowOrHideOtherPlayers(bool _value)
|
| | | {
|
| | | SystemSetting.Instance.SetSystemSettingSwitch(SystemSwitch.OtherPlayer, _value);
|
| | |
| | | const string SOUND_VOLUME_KEY = "SoundRatioKey"; //音乐
|
| | | const string SOUND_EFFECT_KEY = "SoundEffect"; //音效
|
| | | const string FPS_KEY = "FPSKey";
|
| | | const string GAMEFRAME_KEY = "GameFrameSetting";//垂直同步率
|
| | |
|
| | | public Dictionary<SystemSwitch, bool> systemSettings = new Dictionary<SystemSwitch, bool>();
|
| | |
|
| | |
| | | public event Action<SystemSwitch, bool> OnSettingChanged;
|
| | | public event Action qualityLevelChangeEvent;
|
| | | public event Action playerSyncCountChangeEvent;
|
| | | public event Action gameFrameChangeEvent;
|
| | |
|
| | | public SystemSetting()
|
| | | {
|
| | |
| | | public float GetSoundEffect()
|
| | | {
|
| | | return LocalSave.GetFloat(SOUND_EFFECT_KEY, 1);
|
| | | }
|
| | |
|
| | | public void SetGameFrame(GameFrame _frame)
|
| | | {
|
| | | LocalSave.SetInt(GAMEFRAME_KEY, (int)_frame);
|
| | | SetFPSLimit((int)_frame);
|
| | | if (gameFrameChangeEvent != null)
|
| | | {
|
| | | gameFrameChangeEvent();
|
| | | }
|
| | | }
|
| | |
|
| | | public GameFrame GetGameFrame()
|
| | | {
|
| | | return (GameFrame)LocalSave.GetInt(GAMEFRAME_KEY, (int)GameFrame.HalfFrame);
|
| | | }
|
| | |
|
| | | public void SetSystemSettingSwitch(SystemSwitch type, bool _value)
|
| | |
| | | public void SetQualityLevel(GameQuality _quality, bool _disabeCamera = true)
|
| | | {
|
| | | LocalSave.SetInt(QUALITY_LEVEL_KEY, Mathf.Clamp((int)_quality, 0, 2));
|
| | | QualitySettings.SetQualityLevel((int)GameQuality.High);
|
| | |
|
| | | QualitySettings.SetQualityLevel(Mathf.Clamp((int)_quality, 0, 2));
|
| | | switch (_quality)
|
| | | {
|
| | | case GameQuality.Low:
|
| | |
| | |
|
| | | public void SetFPSLimit(int _fps)
|
| | | {
|
| | | LocalSave.SetInt(FPS_KEY, Application.targetFrameRate = Mathf.Clamp(_fps, 30, 60));
|
| | | Application.targetFrameRate = Mathf.Clamp(_fps, 30, 60);
|
| | | }
|
| | |
|
| | | public int GetFPSLimit()
|
| | | {
|
| | | return LocalSave.GetInt(FPS_KEY, 30);
|
| | | return (int)GetGameFrame();
|
| | | }
|
| | |
|
| | | public void LetFPSUnLimit()
|
| | |
| | | Low = 0,
|
| | | Medium = 1,
|
| | | High = 2,
|
| | | }
|
| | |
|
| | | public enum GameFrame
|
| | | {
|
| | | Free = -1,
|
| | | HalfFrame = 30,
|
| | | FullFrame = 60,
|
| | | } |
| | |
| | |
|
| | | public class MarqueeWin : Window
|
| | | {
|
| | | [SerializeField]
|
| | | RichText marqueeText;
|
| | | [SerializeField]
|
| | | RectTransform marqueeBg;
|
| | | [SerializeField]
|
| | | TweenCurve tweenCurve;
|
| | |
|
| | | [SerializeField] RectTransform m_ContainerMarquee;
|
| | | [SerializeField] RichText marqueeText;
|
| | | [SerializeField] RectTransform marqueeBg;
|
| | | [SerializeField] TweenCurve tweenCurve;
|
| | | [SerializeField] UIEffect m_Effect;
|
| | | #region 参数
|
| | | Vector3 fromPos;
|
| | | Vector3 toPos;
|
| | |
| | |
|
| | | [SerializeField]
|
| | | float speed = 5.0f;
|
| | |
|
| | | Coroutine cacheCoroutine = null;
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | |
| | | m_Time = 0;
|
| | | ServerTipDetails.OnTweening = false;
|
| | | presentCnt = 0;
|
| | | m_ContainerMarquee.gameObject.SetActive(false);
|
| | | if (cacheCoroutine != null)
|
| | | {
|
| | | StopCoroutine(cacheCoroutine);
|
| | | cacheCoroutine = null;
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | m_Effect.Play();
|
| | | cacheCoroutine = StartCoroutine(Co_StartTween());
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | BeginMarquee();
|
| | | //BeginMarquee();
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | ServerTipDetails.OnTweening = false;
|
| | | presentCnt = 0;
|
| | | if (cacheCoroutine != null)
|
| | | {
|
| | | StopCoroutine(cacheCoroutine);
|
| | | cacheCoroutine = null;
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | |
|
| | | }
|
| | |
|
| | | IEnumerator Co_StartTween()
|
| | | {
|
| | | yield return WaitingForSecondConst.WaitMS500;
|
| | | m_ContainerMarquee.gameObject.SetActive(true);
|
| | | BeginMarquee();
|
| | | }
|
| | |
|
| | | protected override void LateUpdate()
|
| | | {
|
| | | base.LateUpdate();
|
| | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | namespace Snxxz.UI |
| | | { |
| | | public class ServerTipDetails |
| | | { |
| | | #region 跑马灯 |
| | | public static bool OnTweening = false; |
| | | private static List<SystemHintData> m_Marquees = new List<SystemHintData>(); |
| | | public static void ShowMarquee(string msg, ArrayList info, int _order, int loopCnt = 1) |
| | | { |
| | | m_Marquees.Add(new SystemHintData() |
| | | { |
| | | appendTime = DateTime.Now, |
| | | message = msg, |
| | | extentionData = info == null ? info : new ArrayList(info), |
| | | order = _order |
| | | }); |
| | | |
| | | m_Marquees.Sort(SysNotifyMgr.Instance.Compare); |
| | | |
| | | if (!WindowCenter.Instance.CheckOpen<MarqueeWin>()) |
| | | { |
| | | WindowCenter.Instance.Open<MarqueeWin>(); |
| | | } |
| | | } |
| | | |
| | | public static SystemHintData RequireMarquee() |
| | | { |
| | | if (m_Marquees.Count > 0) |
| | | { |
| | | var _hint = m_Marquees[0]; |
| | | m_Marquees.RemoveAt(0); |
| | | return _hint; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 固定全服消息 |
| | | private static List<SystemHintData> hintTips = new List<SystemHintData>(); |
| | | |
| | | public static void ShowServerTip(string msg, ArrayList info, int order) |
| | | { |
| | | hintTips.Add(new SystemHintData() |
| | | { |
| | | message = msg, |
| | | order = order, |
| | | extentionData = info == null ? info : new ArrayList(info), |
| | | appendTime = DateTime.Now, |
| | | }); |
| | | |
| | | hintTips.Sort(SysNotifyMgr.Instance.Compare); |
| | | |
| | | MessageWin.Inst.ShowServerTip(); |
| | | } |
| | | |
| | | public static SystemHintData RequireServerTip() |
| | | { |
| | | if (hintTips.Count > 0) |
| | | { |
| | | var _hint = hintTips[0]; |
| | | hintTips.RemoveAt(0); |
| | | return _hint; |
| | | } |
| | | return null; |
| | | } |
| | | #endregion |
| | | |
| | | public static void ClearHint() |
| | | { |
| | | hintTips.Clear(); |
| | | m_Marquees.Clear(); |
| | | queueTrumpetTips.Clear(); |
| | | } |
| | | |
| | | #region 喇叭信息 |
| | | private static Queue<ChatTrumpetData> queueTrumpetTips = new Queue<ChatTrumpetData>(); |
| | | public static void ShowTrumpetTip(ChatTrumpetData trumpetData) |
| | | { |
| | | queueTrumpetTips.Enqueue(trumpetData); |
| | | if (!WindowCenter.Instance.CheckOpen<TrumpetWin>()) |
| | | { |
| | | WindowCenter.Instance.Open<TrumpetWin>(); |
| | | } |
| | | } |
| | | public static ChatTrumpetData RequireTrumpetTip() |
| | | { |
| | | if (queueTrumpetTips.Count > 0) |
| | | { |
| | | return queueTrumpetTips.Dequeue(); |
| | | } |
| | | return null; |
| | | } |
| | | public static int GetTrumpetSurplusCnt() |
| | | { |
| | | return queueTrumpetTips.Count; |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | | |
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using System.Linq;
|
| | | using System.Text;
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class ServerTipDetails
|
| | | {
|
| | | #region 跑马灯
|
| | | public static bool OnTweening = false;
|
| | | private static List<SystemHintData> m_Marquees = new List<SystemHintData>();
|
| | | public static void ShowMarquee(string msg, ArrayList info, int _order, int loopCnt = 1)
|
| | | {
|
| | | m_Marquees.Add(new SystemHintData()
|
| | | {
|
| | | appendTime = DateTime.Now,
|
| | | message = msg,
|
| | | extentionData = info == null ? info : new ArrayList(info),
|
| | | order = _order
|
| | | });
|
| | |
|
| | | m_Marquees.Sort(SysNotifyMgr.Instance.Compare);
|
| | |
|
| | | if (!CheckOpenMarquee())
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (!WindowCenter.Instance.CheckOpen<MarqueeWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<MarqueeWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | public static void OnStageLoadFinish()
|
| | | {
|
| | | if (StageManager.Instance.CurrentStage is LoginStage
|
| | | || StageManager.Instance.CurrentStage is SelectRoleStage)
|
| | | {
|
| | | m_Marquees.Clear();
|
| | | return;
|
| | | }
|
| | | SnxxzGame.Instance.StartCoroutine(Co_StageLoadFinish());
|
| | | }
|
| | |
|
| | | static IEnumerator Co_StageLoadFinish()
|
| | | {
|
| | | yield return null;
|
| | | if (CheckOpenMarquee() && m_Marquees.Count > 0)
|
| | | {
|
| | | if (!WindowCenter.Instance.CheckOpen<MarqueeWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<MarqueeWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | static bool CheckOpenMarquee()
|
| | | {
|
| | | return (StageManager.Instance.CurrentStage is DungeonStage) && !StageManager.Instance.isLoading;
|
| | | }
|
| | |
|
| | | public static SystemHintData RequireMarquee()
|
| | | {
|
| | | if (m_Marquees.Count > 0)
|
| | | {
|
| | | var _hint = m_Marquees[0];
|
| | | m_Marquees.RemoveAt(0);
|
| | | return _hint;
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region 固定全服消息
|
| | | private static List<SystemHintData> hintTips = new List<SystemHintData>();
|
| | |
|
| | | public static void ShowServerTip(string msg, ArrayList info, int order)
|
| | | {
|
| | | hintTips.Add(new SystemHintData()
|
| | | {
|
| | | message = msg,
|
| | | order = order,
|
| | | extentionData = info == null ? info : new ArrayList(info),
|
| | | appendTime = DateTime.Now,
|
| | | });
|
| | |
|
| | | hintTips.Sort(SysNotifyMgr.Instance.Compare);
|
| | |
|
| | | MessageWin.Inst.ShowServerTip();
|
| | | }
|
| | |
|
| | | public static SystemHintData RequireServerTip()
|
| | | {
|
| | | if (hintTips.Count > 0)
|
| | | {
|
| | | var _hint = hintTips[0];
|
| | | hintTips.RemoveAt(0);
|
| | | return _hint;
|
| | | }
|
| | | return null;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | public static void ClearHint()
|
| | | {
|
| | | hintTips.Clear();
|
| | | m_Marquees.Clear();
|
| | | queueTrumpetTips.Clear();
|
| | | }
|
| | |
|
| | | #region 喇叭信息
|
| | | private static Queue<ChatTrumpetData> queueTrumpetTips = new Queue<ChatTrumpetData>();
|
| | | public static void ShowTrumpetTip(ChatTrumpetData trumpetData)
|
| | | {
|
| | | queueTrumpetTips.Enqueue(trumpetData);
|
| | | if (!WindowCenter.Instance.CheckOpen<TrumpetWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<TrumpetWin>();
|
| | | }
|
| | | }
|
| | | public static ChatTrumpetData RequireTrumpetTip()
|
| | | {
|
| | | if (queueTrumpetTips.Count > 0)
|
| | | {
|
| | | return queueTrumpetTips.Dequeue();
|
| | | }
|
| | | return null;
|
| | | }
|
| | | public static int GetTrumpetSurplusCnt()
|
| | | {
|
| | | return queueTrumpetTips.Count;
|
| | | }
|
| | | #endregion
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (value == TreasureShowStep.UnLock)
|
| | | {
|
| | | m_ProgressPosTween.SetEndState();
|
| | | UI3DTreasureSelectStage.Instance.SetEndState();
|
| | | }
|
| | | return;
|
| | |
| | | var stage = m_Treasure.treasureStages[m_Treasure.stage];
|
| | | var _index = m_Treasure.GetStageIndex(stage.stage);
|
| | | model.SetTreasureStageShow(m_Treasure.id, stage.stage);
|
| | |
|
| | | if (WindowCenter.Instance.CheckOpen<TreasureStageTipWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<TreasureStageTipWin>();
|
| | | }
|
| | |
|
| | | switch (stage.unlockType)
|
| | | {
|
| | | case TreasureStageUnlock.Skill:
|
| | |
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFunctionStateChange;
|
| | | packageModel.RefreshItemCountAct += OnPackageItemChange;
|
| | | WindowCenter.Instance.windowAfterOpenEvent += OnWindowOpen;
|
| | | NewBieCenter.Instance.guideCompletedEvent += GuideComplete;
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | achievementModel.achievementProgressUpdateEvent -= OnAchievementProgressUpdate;
|
| | | achievementModel.achievementAwardableEvent -= OnAchievementAwardable;
|
| | | achievementModel.achievementCompletedEvent -= OnAchievementCompleted;
|
| | | NewBieCenter.Instance.guideCompletedEvent -= GuideComplete;
|
| | |
|
| | | DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= OnGetSkillLevelUpResult;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnTreasurePotentialSPChange;
|
| | |
| | | LocalSave.SetInt(StringUtility.Contact(_playerId, _type, "_TreasureUnlockShow"), _id);
|
| | | }
|
| | |
|
| | | public void SetTreasureStageShow(int _id,int _stage)
|
| | | public void SetTreasureStageShow(int _id, int _stage)
|
| | | {
|
| | | LocalSave.SetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID,
|
| | | "_TreasureStageShow_", _id), _stage);
|
| | |
| | | newGotTreasureId = id;
|
| | | treasureEntranceShowId = id;
|
| | |
|
| | | var mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
|
| | | if (mapConfig.MapFBType == (int)MapType.OpenCountry)
|
| | | {
|
| | | if (WindowCenter.Instance.CheckOpen<MainInterfaceWin>())
|
| | | {
|
| | | if (PreFightMission.Instance.IsFinished())
|
| | | {
|
| | | WindowCenter.Instance.Open<TreasureNewGotWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | | OpenTreasureNewGot();
|
| | | }
|
| | |
|
| | | if (treasureCollectingShowId == id)
|
| | |
| | | {
|
| | | if (_window is MainInterfaceWin)
|
| | | {
|
| | | if (newGotTreasureId != 0)
|
| | | {
|
| | | if (PreFightMission.Instance.IsFinished())
|
| | | {
|
| | | WindowCenter.Instance.Open<TreasureNewGotWin>();
|
| | | }
|
| | | }
|
| | | SnxxzGame.Instance.StartCoroutine(Co_OpenTreasureNewGot());
|
| | | if (needDisplayReguluLevelUp)
|
| | | {
|
| | | CheckReguluPop();
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | void GuideComplete(int _id)
|
| | | {
|
| | | SnxxzGame.Instance.StartCoroutine(Co_OpenTreasureNewGot());
|
| | | }
|
| | |
|
| | | IEnumerator Co_OpenTreasureNewGot()
|
| | | {
|
| | | yield return WaitingForSecondConst.WaitMS600;
|
| | | OpenTreasureNewGot();
|
| | | }
|
| | |
|
| | | public void CheckOpenTreasureNewGot()
|
| | | {
|
| | | SnxxzGame.Instance.StartCoroutine(Co_OpenTreasureNewGot());
|
| | | }
|
| | |
|
| | | private void OpenTreasureNewGot()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage) || !serverInited)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (!PreFightMission.Instance.IsFinished() || newGotTreasureId == 0
|
| | | || NewBieCenter.Instance.inGuiding || !WindowCenter.Instance.CheckOpen<MainInterfaceWin>()
|
| | | || WindowCenter.Instance.ExitAnyFullScreenOrMaskWinLEqual(WindowType.Base)
|
| | | || WindowCenter.Instance.CheckOpen<TreasureNewGotWin>())
|
| | | {
|
| | | return;
|
| | | }
|
| | | var dungeonModel = ModelCenter.Instance.GetModel<DungeonModel>();
|
| | | var mapId = dungeonModel.GetDungeonDataIdByMapId(PlayerDatas.Instance.baseData.MapID);
|
| | | if (mapId == 41110)
|
| | | {
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Open<TreasureNewGotWin>();
|
| | | }
|
| | |
|
| | | private void UpdateSkillLevelUpRedpoint(int _treasureId)
|
| | | {
|
| | | if (treasures.ContainsKey(_treasureId))
|
| | |
| | | }
|
| | | CloseImmediately();
|
| | | UI3DTreasureSelectStage.Instance.Close();
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | });
|
| | | }
|
| | |
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | if (!WindowJumpMgr.Instance.IsJumpState && !m_CorrectClose)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | VipInvestModel VipInvestModel { get { return m_VipInvestModel ?? (m_VipInvestModel = ModelCenter.Instance.GetModel<VipInvestModel>()); } }
|
| | | private bool IsOk = false;
|
| | | public bool IsRedpoint = false;
|
| | |
|
| | | private int DisplayLevel = 0;//显示等级
|
| | | private int DisplayDays = 0;//显示天数
|
| | | //----
|
| | | private bool IsOneRedPoint = true;
|
| | | public override void Init()
|
| | | {
|
| | | var InvestRedPoint = Config.Instance.Get<FuncConfigConfig>("InvestRedPoint");
|
| | | DisplayLevel = int.Parse(InvestRedPoint.Numerical2);
|
| | | DisplayDays = int.Parse(InvestRedPoint.Numerical3);
|
| | |
|
| | | int[] MultipleIntList = ConfigParse.GetMultipleStr<int>(Config.Instance.Get<FuncConfigConfig>("JadeInvest").Numerical1);
|
| | | MultipleList.Clear();
|
| | | for (int i = 0; i < MultipleIntList.Length; i++)
|
| | |
| | | IsOk = true;
|
| | | InvestmentAmount();
|
| | | InvestmentRedPoint();
|
| | | if (TimeUtility.CreateDays <= 3 && redPointStre1.state == RedPointState.None)
|
| | | if (TimeUtility.CreateDays <= DisplayDays && redPointStre1.state == RedPointState.None)
|
| | | {
|
| | | IsRedpoint = true;
|
| | | if (PlayerDatas.Instance.baseData.LV >= 30)
|
| | | if (PlayerDatas.Instance.baseData.LV >= DisplayLevel)
|
| | | {
|
| | | RedPointSate();
|
| | | }
|
| | |
| | | }
|
| | | if (_tCDBPlayerRefresh == PlayerDataRefresh.LV)
|
| | | {
|
| | | if (TimeUtility.CreateDays <= 3 && redPointStre1.state == RedPointState.None && PlayerDatas.Instance.baseData.LV >= 30)
|
| | | if (TimeUtility.CreateDays <= DisplayDays && redPointStre1.state == RedPointState.None && PlayerDatas.Instance.baseData.LV >= DisplayLevel)
|
| | | {
|
| | | if (IsRedpoint)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | | int type1 = -1;
|
| | | if (JumpInedx == 0 && InvestmentGrade != 0)
|
| | |
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | private void RedPointSate()//月卡投资创角前三天红点
|
| | |
| | | }
|
| | | if (IsRedpoint)
|
| | | {
|
| | | redPointStre1.state = RedPointState.Simple;
|
| | | if (IsOneRedPoint)
|
| | | {
|
| | | redPointStre1.state = RedPointState.Simple;
|
| | | IsOneRedPoint = false;
|
| | | } |
| | | }
|
| | | else
|
| | | {
|
| | |
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | if (fairyJadeInvestmentModel.IsRedpoint)
|
| | | if (fairyJadeInvestmentModel.redPointStre1.state==RedPointState.Simple)
|
| | | {
|
| | | fairyJadeInvestmentModel.IsRedpoint = false;
|
| | | if (FairyJadeInvestmentRedPointEvent != null)
|
| | |
| | | if(PlayerDatas.Instance.baseData.coinPointTotal > 0
|
| | | && !model.firstChargeRewardGet)
|
| | | {
|
| | | ModelCenter.Instance.GetModel<OSGiftModel>().giftGetNotify = true;
|
| | | CA504_tagCMPlayerGetReward pak = new CA504_tagCMPlayerGetReward();
|
| | | pak.RewardType = (byte)GotServerRewardType.Def_RewardType_GoldGiftFirst;
|
| | | pak.DataEx = 0;
|
| | |
| | | public Dictionary<int, int> DicBuyPackage = new Dictionary<int, int>();
|
| | | public event Action UpdateLimitedTimePackageItem;
|
| | | public event Action<int> onStateUpate;
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | OpenServerActivityCenter.Instance.Register(7, this);
|
| | |
| | |
|
| | |
|
| | | public bool IsShowPanel = false;
|
| | |
|
| | | private const int Redpoint_key1 = 20907;
|
| | | public Redpoint redPointStre1 = new Redpoint(209, Redpoint_key1);//限时礼包红点
|
| | | public bool IsOpen
|
| | | {
|
| | | get
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void IsShowTip()
|
| | | public void IsShowTip()
|
| | | {
|
| | | int GetDayOfYear = DateTime.Now.DayOfYear;
|
| | | int day = LocalSave.GetInt("IsOpenLimitedTime");
|
| | |
| | | {
|
| | | LocalSave.SetInt("IsOpenLimitedTime", GetDayOfYear);
|
| | | IsShowPanel = true;
|
| | | redPointStre1.state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | redPointStre1.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | if (limitedTimePackageItemModel.IsShowPanel)
|
| | | {
|
| | | limitedTimePackageItemModel.IsShowPanel = false;
|
| | | limitedTimePackageItemModel.IsShowTip();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | WindowCenter.Instance.Open<MainInterfaceWin>(); |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | } |
| | | } |
| | | #endregion |
| | | private void OnExperienceBtn() |
| | |
| | | public int NeedVipLv { get; private set;}
|
| | | private bool IsOkBool = false;
|
| | | public bool IsRedpoint = false;
|
| | |
|
| | | private int DisplayLevel = 0;//显示等级
|
| | | private int DisplayDays = 0;//显示天数
|
| | | //----
|
| | | private bool IsOneRedPoint = true;
|
| | | public override void Init()
|
| | | {
|
| | | vipInvestDict.Clear();
|
| | |
| | | vipInvestLvlimitDict.Clear();
|
| | | investGoldDict.Clear();
|
| | | investMaxDayDict.Clear();
|
| | |
|
| | | var InvestRedPoint = Config.Instance.Get<FuncConfigConfig>("InvestRedPoint");
|
| | | DisplayLevel = int.Parse(InvestRedPoint.Numerical1);
|
| | | DisplayDays = int.Parse(InvestRedPoint.Numerical3);
|
| | | FuncConfigConfig vipInvestLv = Config.Instance.Get<FuncConfigConfig>("VIPInvest");
|
| | | NeedVipLv = int.Parse(vipInvestLv.Numerical2);
|
| | | JsonData vipInvestData = JsonMapper.ToObject(vipInvestLv.Numerical1);
|
| | |
| | | VipInvestWin.VipInvestRedPointEvent += VipInvestRedPointEvent;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;
|
| | | if (TimeUtility.CreateDays <= 3 && redPointStre1.state==RedPointState.None)
|
| | | if (TimeUtility.CreateDays <= DisplayDays && redPointStre1.state==RedPointState.None)
|
| | | {
|
| | | IsRedpoint = true;
|
| | | if (PlayerDatas.Instance.baseData.LV >= 30)
|
| | | if (PlayerDatas.Instance.baseData.LV >= DisplayLevel)
|
| | | {
|
| | | RedPointSate();
|
| | | }
|
| | |
| | | {
|
| | | if (_tCDBPlayerRefresh == PlayerDataRefresh.LV)
|
| | | {
|
| | | if (TimeUtility.CreateDays <= 3 && redPointStre1.state == RedPointState.None && PlayerDatas.Instance.baseData.LV >= 30)
|
| | | if (TimeUtility.CreateDays <= DisplayDays && redPointStre1.state == RedPointState.None && PlayerDatas.Instance.baseData.LV >= DisplayLevel)
|
| | | {
|
| | | if (IsRedpoint)
|
| | | {
|
| | |
| | | {
|
| | | return investGoldDict[type][index];
|
| | | }
|
| | |
|
| | | return 0;
|
| | | }
|
| | |
|
| | |
| | | return index;
|
| | | }
|
| | | }
|
| | |
|
| | | return "";
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | cycle = day / 7;
|
| | | }
|
| | |
|
| | | return cycle;
|
| | | }
|
| | |
|
| | |
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | ServerInvestInfo InvestInfo;
|
| | | int cycle = 0;
|
| | | private List<InvestConfig> configlist;
|
| | |
| | | break;
|
| | | default:
|
| | | break;
|
| | |
|
| | | }
|
| | | // redPointStre1.state = RedPointState.Simple;
|
| | | JumpIndex = i;
|
| | |
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | if (IsRedpoint)
|
| | | {
|
| | | redPointStre1.state = RedPointState.Simple;
|
| | | if (IsOneRedPoint)
|
| | | {
|
| | | redPointStre1.state = RedPointState.Simple;
|
| | | IsOneRedPoint = false;
|
| | | } |
| | | }
|
| | | else
|
| | | {
|
| | | VipInvestRedPoint();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | | public struct InvestReward
|
| | |
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | if (investModel.IsRedpoint)
|
| | | if (investModel.redPointStre1.state==RedPointState.Simple)
|
| | | {
|
| | | investModel.IsRedpoint = false;
|
| | | if (VipInvestRedPointEvent != null)
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | ModelCenter.Instance.GetModel<TreasureModel>().CheckOpenTreasureNewGot();
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | {
|
| | | functionOrder = 3;
|
| | | }
|
| | | else if (sevenDayModel.redPointStre1.state == RedPointState.Simple && FuncOpen.Instance.IsFuncOpen(115))
|
| | | else if (sevenDayModel.redPointStre1.state == RedPointState.GetReward && FuncOpen.Instance.IsFuncOpen(115))
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<WelfareWin>(false, 2);
|
| | |
| | | {
|
| | | functionOrder = 3;
|
| | | }
|
| | | else if (sevenDayModel.redPointStre1.state == RedPointState.Simple && FuncOpen.Instance.IsFuncOpen(115))
|
| | | else if (sevenDayModel.redPointStre1.state == RedPointState.GetReward && FuncOpen.Instance.IsFuncOpen(115))
|
| | | {
|
| | | return 2;
|
| | | }
|
| | |
| | | FairyModel fairyModel { get { return ModelCenter.Instance.GetModel<FairyModel>(); } }
|
| | | DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
|
| | | TrialDungeonModel trialDungeonModel { get { return ModelCenter.Instance.GetModel<TrialDungeonModel>(); } }
|
| | | ImpactRankModel rankModel { get { return ModelCenter.Instance.GetModel<ImpactRankModel>(); } }
|
| | |
|
| | | public bool IsJumpState { get; private set;}
|
| | | private int jumpPhase = 0;
|
| | |
| | | }
|
| | | break;
|
| | | case JumpUIType.OpenServerMountRank:
|
| | | var type = int.Parse(_tagWinSearchModel.SelectActive);
|
| | | if (rankModel.IsLock(type))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("InOperationTimeError");
|
| | | return;
|
| | | }
|
| | | if (TimeUtility.OpenDay >= rankModel.openServerActivityDays)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("ActiveOutTime");
|
| | | return;
|
| | | }
|
| | | break;
|
| | | case JumpUIType.OpenServerRank:
|
| | | var _model = ModelCenter.Instance.GetModel<ImpactRankModel>();
|
| | | if (TimeUtility.OpenDay >= _model.openServerActivityDays)
|
| | | if (TimeUtility.OpenDay >= rankModel.openServerActivityDays)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("ActiveOutTime");
|
| | | return;
|
| | |
| | | SetJumpLogic<BlastFurnaceWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.OpenServerMountRank:
|
| | | ModelCenter.Instance.GetModel<ImpactRankModel>().gotoImpactRankType =int.Parse(_tagWinSearchModel.SelectActive);
|
| | | var type = int.Parse(_tagWinSearchModel.SelectActive);
|
| | | ModelCenter.Instance.GetModel<ImpactRankModel>().gotoImpactRankType = type;
|
| | | SetJumpLogic<OpenServerActivityWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.OpenServerRank:
|
| | |
| | | treasureModel.selectedTreasure = int.Parse(_tagWinSearchModel.SelectActive);
|
| | | SetJumpLogic<TreasureLevelUpWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.FYZJTyp1:
|
| | | case JumpUIType.FYZJTyp2:
|
| | | case JumpUIType.SHLTyp1:
|
| | | case JumpUIType.SHLTyp2:
|
| | | treasureModel.currentCategory = TreasureCategory.Demon;
|
| | | treasureModel.selectedTreasure = int.Parse(_tagWinSearchModel.SelectActive);
|
| | | SetJumpLogic<TreasureLevelUpWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | |
|
| | | case JumpUIType.DhszTs:
|
| | | case JumpUIType.HyqTs:
|
| | | case JumpUIType.GyzTs:
|
| | |
| | | TJYJS = 1017, //天机仪介绍界面
|
| | | Type1TreasureFunc3 = 1018, //仙族法宝
|
| | | LLBT = 1019, //玲珑宝塔界面
|
| | | FYZJTyp1 = 1020, //焚源之炬界面
|
| | | FYZJTyp2 = 1021, //焚源之炬界面
|
| | | SHLTyp1 = 1022, //摄魂铃界面
|
| | | SHLTyp2 = 1023, //摄魂铃界面
|
| | | }
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | |
| | | public override void CloseClick()
|
| | | {
|
| | | base.CloseClick();
|
| | |
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | void Init()
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | |
| | | public override void CloseClick()
|
| | | {
|
| | | base.CloseClick();
|
| | |
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | void Init()
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, August 23, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using UnityEngine.Events; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class OnOffToggle : MonoBehaviour |
| | | { |
| | | |
| | | [SerializeField] Button m_Button; |
| | | [SerializeField] RectTransform m_Handle; |
| | | [SerializeField] Image m_BackGround; |
| | | [SerializeField] RectTransform m_OnShow; |
| | | [SerializeField] RectTransform m_OffShow; |
| | | [SerializeField] Vector2 m_OnHandleOffset; |
| | | [SerializeField] Vector2 m_OffHandleOffset; |
| | | |
| | | bool m_IsOn = false; |
| | | public bool isOn { |
| | | get { return m_IsOn; } |
| | | set { |
| | | m_IsOn = value; |
| | | SwitchShowState(m_IsOn); |
| | | } |
| | | } |
| | | |
| | | public void AddListener(UnityAction _action) |
| | | { |
| | | if (m_Button != null) |
| | | { |
| | | m_Button.AddListener(_action); |
| | | } |
| | | } |
| | | |
| | | public void RemoveAllListeners() |
| | | { |
| | | if (m_Button != null) |
| | | { |
| | | m_Button.RemoveAllListeners(); |
| | | } |
| | | } |
| | | |
| | | private void SwitchShowState(bool _isOn) |
| | | { |
| | | m_Handle.anchoredPosition = _isOn ? m_OnHandleOffset : m_OffHandleOffset; |
| | | m_BackGround.SetSprite(_isOn ? "SettingUpWin_NO" : "SettingUpWin_OFF"); |
| | | m_OnShow.gameObject.SetActive(_isOn); |
| | | m_OffShow.gameObject.SetActive(!_isOn); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: dd8929af600e643478d3f0a22d7e3c52 |
| | | timeCreated: 1535009068 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | |
|
| | | public static void GetCpuAndMemory(out int _cpu, out int _memory)//内存单位是MB
|
| | | {
|
| | | _cpu = Environment.ProcessorCount;
|
| | | switch (Application.platform)
|
| | | try
|
| | | {
|
| | | case RuntimePlatform.Android:
|
| | | _memory = SDKUtility.Instance.Device.totalMemory;
|
| | | break;
|
| | | case RuntimePlatform.IPhonePlayer:
|
| | | _memory = IsLowMemory() ? 1 : 2 * 1024;
|
| | | break;
|
| | | default:
|
| | | _memory = 4 * 1024;
|
| | | break;
|
| | | _cpu = Environment.ProcessorCount;
|
| | | switch (Application.platform)
|
| | | {
|
| | | case RuntimePlatform.Android:
|
| | | _memory = SDKUtility.Instance.Device.totalMemory;
|
| | | break;
|
| | | case RuntimePlatform.IPhonePlayer:
|
| | | _memory = IsLowMemory() ? 1 : 2 * 1024;
|
| | | break;
|
| | | default:
|
| | | _memory = 4 * 1024;
|
| | | break;
|
| | | }
|
| | |
|
| | | cpu = _cpu;
|
| | | memory = _memory;
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | Debug.Log(ex);
|
| | | _cpu = 2;
|
| | | _memory = 2 * 1024;
|
| | | }
|
| | |
|
| | | cpu = _cpu;
|
| | | memory = _memory;
|
| | | }
|
| | | |
| | | } |
| | |
| | | /** 闪避 */
|
| | | Miss,
|
| | | /** 免疫 */
|
| | | Immune
|
| | | Immune,
|
| | | /** 压制 */
|
| | | Suppress
|
| | | }
|
| | |
|
| | | public enum E_PlayerState
|
| | |
| | |
|
| | | }
|
| | |
|
| | | const string chatReportUrl = "http://monitor.secondworld.net.cn:12000/chat_receiver";
|
| | | public void ChatReport(string content, string channelName, string toPlayer)
|
| | | {
|
| | | #if !UNITY_EDITOR
|
| | | var tables = new Dictionary<string, string>();
|
| | | tables["ProductID"] = "snxxz";
|
| | | tables["OperatorID"] = VersionConfig.Get().appId;
|
| | | tables["OperatorName"] = string.Empty;
|
| | | tables["RegionName"] = StringUtility.Contact("s", ServerListCenter.Instance.currentServer.region_flag);
|
| | | tables["RegionID"] = ServerListCenter.Instance.currentServer.region_flag.ToString();
|
| | | tables["EventID"] = 9003.ToString();
|
| | | tables["Time"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
| | | tables["IP"] = DeviceUtility.GetIp();
|
| | | tables["ChatChannel"] = channelName;
|
| | | tables["AccountID"] = ModelCenter.Instance.GetModel<LoginModel>().sdkLoginResult.account;
|
| | | tables["RoleID"] = PlayerDatas.Instance.baseData.PlayerName;
|
| | | tables["ToRoleID"] = toPlayer;
|
| | | tables["Level"] = PlayerDatas.Instance.baseData.LV.ToString();
|
| | | tables["VIPLevel"] = PlayerDatas.Instance.baseData.VIPLv.ToString();
|
| | | tables["Content"] = content;
|
| | |
|
| | | HttpRequest.Instance.RequestHttpGet(StringUtility.Contact(chatReportUrl, HttpRequest.HashtablaToString(tables)), HttpRequest.defaultHttpContentType);
|
| | | #endif
|
| | | }
|
| | |
|
| | | }
|