| Core/GameEngine/Login/LaunchPostProcess.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/RuneTower/RuneTowerModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Core/GameEngine/Login/LaunchPostProcess.cs
@@ -3,6 +3,7 @@ using UnityEngine; using Snxxz.UI; using TableConfig; using System; public class LaunchPostProcess : SingletonMonobehaviour<LaunchPostProcess> { @@ -24,23 +25,32 @@ { if (!completed && ConfigManager.Instance.AllCompleted()) { ConfigManager.Instance.ConfigParsePostProcess(); try { ConfigManager.Instance.ConfigParsePostProcess(); GeneralConfig.Instance.Init(); InGameDownLoad.Instance.ParseRewardConfig(); ModelCenter.Instance.Init(); SkillHelper.Instance.Init(); StatusMgr.Instance.Init(); GAMgr.Instance.Init(); FlyObjectManager.Instance.Initialize(); SFXPlayUtility.Instance.Initialize(); AnyCountDownUtility.Instance.Initialize(); MapTransferUtility.Instance.Initialize(); DirtyWordConfig.Init(); NewBieCenter.Instance.Init(); GeneralConfig.Instance.Init(); InGameDownLoad.Instance.ParseRewardConfig(); ModelCenter.Instance.Init(); SkillHelper.Instance.Init(); StatusMgr.Instance.Init(); GAMgr.Instance.Init(); FlyObjectManager.Instance.Initialize(); SFXPlayUtility.Instance.Initialize(); AnyCountDownUtility.Instance.Initialize(); MapTransferUtility.Instance.Initialize(); DirtyWordConfig.Init(); NewBieCenter.Instance.Init(); DebugEx.LogFormat("解析配置表耗时:{0}", Time.time - startTime); completed = true; DebugEx.LogFormat("解析配置表耗时:{0}", Time.time - startTime); } catch (Exception ex) { Debug.LogErrorFormat("严重警告:游戏逻辑初始化失败,无法进入游戏!错误:{0}", ex); } finally { completed = true; } } } System/RuneTower/RuneTowerModel.cs
@@ -14,7 +14,10 @@ int m_YesterdayPassFloor = 0; public int yesterdayPassFloor { get { return m_YesterdayPassFloor; } set { m_YesterdayPassFloor = value; } set { m_YesterdayPassFloor = value; UpdateRedpoint(); } } public int currentTower { @@ -98,6 +101,8 @@ public event Action<int> sweepBoughtTimesChangeEvent; RuneModel runeModel { get { return ModelCenter.Instance.GetModel<RuneModel>(); } } DailyQuestModel dailyModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } } Redpoint redpoint = new Redpoint(37); bool serverInited = false; @@ -106,11 +111,13 @@ ParseConfig(); runeModel.OnRefreshRuneTowerLv += OnPassNewTowerFloor; dailyModel.dailyQuestProgressUpdateEvent += OnRuneTowerSweepTimeChange; } public override void UnInit() { runeModel.OnRefreshRuneTowerLv -= OnPassNewTowerFloor; dailyModel.dailyQuestProgressUpdateEvent -= OnRuneTowerSweepTimeChange; } public void RequestChallengeTower() @@ -354,6 +361,20 @@ } private void OnRuneTowerSweepTimeChange(int _dailyQuestId) { if (_dailyQuestId == 11) { UpdateRedpoint(); } } private void UpdateRedpoint() { var sweepTimes = dailyModel.GetDailyQuestCompletedTimes((int)DailyQuestType.RuneTowerSweep); redpoint.state = yesterdayPassFloor > 0 && sweepTimes < 1 ? RedPointState.Simple : RedPointState.None; } private void ParseConfig() { var allTowerFloors = ConfigManager.Instance.GetAllValues<RuneTowerFloorConfig>();