From 763358e95ba4daabf08647d7984f41bdfd104156 Mon Sep 17 00:00:00 2001 From: huqibin <762612145@qq.com> Date: Wed, 23 Apr 2025 15:14:16 +0800 Subject: [PATCH] =?UTF-8?q?611=E3=80=81612=20BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Player10007_7002.cs | 3 +- Assets/Scripts/Score_7002.cs | 21 ----- Assets/Scripts/StepState_7002.cs | 5 ++ ...stallAndDismantleTicketPanel_10007_7002.cs | 6 +- .../Template/Scripts/CXX/Score/ScoreBase.cs | 9 --- .../Template/Scripts/CXX/Score/Score_2002.cs | 37 --------- Assets/Template/Scripts/HQB/SecurityCheck.cs | 7 ++ .../Scripts/Project/Manager/GameManager.cs | 76 +++++++++---------- .../Scripts/Project/Manager/ReconnectMgr.cs | 4 +- 9 files changed, 56 insertions(+), 112 deletions(-) diff --git a/Assets/Scripts/Player10007_7002.cs b/Assets/Scripts/Player10007_7002.cs index 16bef41..a998f9a 100644 --- a/Assets/Scripts/Player10007_7002.cs +++ b/Assets/Scripts/Player10007_7002.cs @@ -22,8 +22,7 @@ public class Player10007_7002 : SingletonMono if (moveNum == 500) { isTour = true; - //Debug.LogError("巡视OK"); - //GameManager.ProcessMgr.CheckSubProcessSteps(GameManager.ProcessMgr.subProcessStepId); + if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID("巡视场站", true) == 0) { ScoreManager.instance.Check("巡视场站", ""); diff --git a/Assets/Scripts/Score_7002.cs b/Assets/Scripts/Score_7002.cs index 3a3b9e6..df27253 100644 --- a/Assets/Scripts/Score_7002.cs +++ b/Assets/Scripts/Score_7002.cs @@ -212,25 +212,4 @@ public class Score_7002 : ScoreBase // GameManager.NetMgr.add(); //} - - - /// - /// ?????List??,?????? - /// - /// - public override string SaveSceneBufferList() - { - - return ""; - //throw new System.NotImplementedException(); - } - - /// - /// ?????? - /// - public override void LoadSceneBufferList(string sceneInfo) - { - - //throw new System.NotImplementedException(); - } } diff --git a/Assets/Scripts/StepState_7002.cs b/Assets/Scripts/StepState_7002.cs index df62e0d..64190db 100644 --- a/Assets/Scripts/StepState_7002.cs +++ b/Assets/Scripts/StepState_7002.cs @@ -63,12 +63,16 @@ public class StepState_7002 : StepState { Score_7002.cdzIndex = 0; Score_7002.ResetDic(); + Player10007_7002.Instance.moveNum = 0; + Player10007_7002.Instance.isTour = false; + Player10007_7002.Instance.isNearCDZ = false; } else if (num == 5) { Score_7002.cdzIndex = 0; Player10007_7002.Instance.moveNum = 500; + Player10007_7002.Instance.isTour = true; } else if (num == 6) { @@ -85,6 +89,7 @@ public class StepState_7002 : StepState else if (num == 7) { Score_7002.cdzIndex = 2; + Player10007_7002.Instance.isNearCDZ = true; } else if (num == 8) { diff --git a/Assets/Scripts/UI_InstallAndDismantleTicketPanel_10007_7002.cs b/Assets/Scripts/UI_InstallAndDismantleTicketPanel_10007_7002.cs index 1cd4c7e..746fe5a 100644 --- a/Assets/Scripts/UI_InstallAndDismantleTicketPanel_10007_7002.cs +++ b/Assets/Scripts/UI_InstallAndDismantleTicketPanel_10007_7002.cs @@ -136,6 +136,9 @@ public class UI_InstallAndDismantleTicketPanel_10007_7002 : BasePanel } print("ύ"); GameManager.EventMgr.EventTrigger(Enum_EventType.Submit); + + GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID("ֳ", true); + ScoreManager.instance.Check("ֳ", null); } else { @@ -143,8 +146,7 @@ public class UI_InstallAndDismantleTicketPanel_10007_7002 : BasePanel } //GameManager.ProcessMgr.CheckSubProcessSteps(GameManager.ProcessMgr.subProcessStepId); GameManager.UIMgr.HidePanel(); - GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID("ֳ", true); - ScoreManager.instance.Check("ֳ", null); + } break; diff --git a/Assets/Template/Scripts/CXX/Score/ScoreBase.cs b/Assets/Template/Scripts/CXX/Score/ScoreBase.cs index 2663af8..3584d92 100644 --- a/Assets/Template/Scripts/CXX/Score/ScoreBase.cs +++ b/Assets/Template/Scripts/CXX/Score/ScoreBase.cs @@ -89,13 +89,4 @@ public abstract class ScoreBase : MonoBehaviour { this.currentScore = _score; } - - /// - /// ¼ֳscoreBaseĸList - /// - public abstract string SaveSceneBufferList(); - /// - /// ԭֳscoreBaseĸList - /// - public abstract void LoadSceneBufferList(string sceneInfo); } diff --git a/Assets/Template/Scripts/CXX/Score/Score_2002.cs b/Assets/Template/Scripts/CXX/Score/Score_2002.cs index f624c9c..f677e05 100644 --- a/Assets/Template/Scripts/CXX/Score/Score_2002.cs +++ b/Assets/Template/Scripts/CXX/Score/Score_2002.cs @@ -463,41 +463,4 @@ public class Score_2002 : ScoreBase return false; } - - /// - /// ?????List??,?????? - /// - /// - public override string SaveSceneBufferList() - { - BufferTemp_2002 tmp = new BufferTemp_2002(); - tmp.TestPen3list = TestPen3list; - tmp.InSwitchCloseYDList = InSwitchCloseYDList; - tmp.InSwitchOpenYDList = InSwitchOpenYDList; - tmp.currentunInstallJieXian = currentunInstallJieXian; - tmp.currentInstallJieXian = currentInstallJieXian; - tmp.installCover = installCover; - tmp.currentInstallTestJieXian = currentInstallTestJieXian; - string sceneInfo = JsonConvert.SerializeObject(tmp, Formatting.Indented); - Debug.Log("==????:" + sceneInfo); - return sceneInfo; - //throw new System.NotImplementedException(); - } - - /// - /// ?????? - /// - public override void LoadSceneBufferList(string sceneInfo) - { - BufferTemp_2002 tmp = new BufferTemp_2002(); - tmp = JsonMapper.ToObject(sceneInfo); - TestPen3list = tmp.TestPen3list; - InSwitchCloseYDList = tmp.InSwitchCloseYDList; - InSwitchOpenYDList = tmp.InSwitchOpenYDList; - currentunInstallJieXian = tmp.currentunInstallJieXian; - currentInstallJieXian = tmp.currentInstallJieXian; - installCover = tmp.installCover; - currentInstallTestJieXian = tmp.currentInstallTestJieXian; - //throw new System.NotImplementedException(); - } } diff --git a/Assets/Template/Scripts/HQB/SecurityCheck.cs b/Assets/Template/Scripts/HQB/SecurityCheck.cs index e195d65..cf90e56 100644 --- a/Assets/Template/Scripts/HQB/SecurityCheck.cs +++ b/Assets/Template/Scripts/HQB/SecurityCheck.cs @@ -32,6 +32,9 @@ public class SecurityCheck : MonoBehaviour [HideInInspector] public string debugStr = ""; +#if UNITY_EDITOR + public bool ForcePassBlack = true; +#endif // ȡļϣֵķ @@ -122,6 +125,10 @@ public class SecurityCheck : MonoBehaviour } result = true; check_finish = true; +#if UNITY_EDITOR + if (ForcePassBlack) + result = true; +#endif } private void Awake() diff --git a/Assets/Template/Scripts/Project/Manager/GameManager.cs b/Assets/Template/Scripts/Project/Manager/GameManager.cs index 653c31f..765bd3b 100644 --- a/Assets/Template/Scripts/Project/Manager/GameManager.cs +++ b/Assets/Template/Scripts/Project/Manager/GameManager.cs @@ -262,8 +262,8 @@ public class GameManager : SingletonAutoMono } IEnumerator AsyncLoadScene(bool isReset = false) - { - while(SecurityCheck.instance.check_finish) + { + while (SecurityCheck.instance.check_finish) yield return null; if (SecurityCheck.instance.result) { @@ -272,14 +272,18 @@ public class GameManager : SingletonAutoMono } else { - + UIMgr.ShowPanel(E_UI_Layer.System, - (p) => { p.Init("错误", "安全检查失败,请重新启动应用!", E_MessageType.Warning, - () => { + (p) => + { + p.Init("错误", "安全检查失败,请重新启动应用!", E_MessageType.Warning, + () => + { UnityEngine.Debug.Log("爆了!"); - Application.Quit(); - }); }); - + Application.Quit(); + }); + }); + } } @@ -294,9 +298,9 @@ public class GameManager : SingletonAutoMono { ResetStateAndEvent(); } - + UIMgr.ShowPanel(E_UI_Layer.Bot, (panel) => { panel.Init(); }); - //GameManager.NetMgr.operationType = "3"; + if (GameManager.NetMgr.operationType == "3") { var modeType = E_ModeType.Exam; @@ -304,7 +308,7 @@ public class GameManager : SingletonAutoMono GameManager.RunModelMgr.schemeID = 7002; GameManager.ProcessMgr.Init(GameManager.RunModelMgr.schemeID); - + GameManager.EventMgr.EventTrigger(Enum_EventType.UpdateProgress, 0.1f); GameManager.NetMgr.init_getSerData(() => { @@ -312,18 +316,14 @@ public class GameManager : SingletonAutoMono { GameManager.ScenesMgr.LoadSceneAsyn($"{GameManager.Instance.systemId}_{GameManager.RunModelMgr.schemeID}_03_OfficeScene", () => { - - //UIMgr.HidePanel(); - //GameManager.UIMgr.HidePanel(); GameManager.UIMgr.HidePanel(); - GameManager.EventMgr.EventTrigger(Enum_EventType.UpdateProgress, 0.9f); + GameManager.EventMgr.EventTrigger(Enum_EventType.UpdateProgress, 0.8f); UIMgr.HidePanel(); - //if (GameManager.RunModelMgr.ModeType != E_ModeType.Study) - { - GameManager.RunModelMgr.startTime = DateTime.Now; - GameManager.NetMgr.setTime(); - UnityEngine.Debug.Log("开始记时:" + GameManager.RunModelMgr.startTime.ToString()); - } + + GameManager.RunModelMgr.startTime = DateTime.Now; + GameManager.NetMgr.setTime(); + UnityEngine.Debug.Log("开始记时:" + GameManager.RunModelMgr.startTime.ToString()); + }); return; } @@ -365,11 +365,9 @@ public class GameManager : SingletonAutoMono int processID = d_SubProcesses[id].processId; int subProcessID = d_SubProcesses[id].id; int subProcessStepID = d_SubProcesses[id].subProcessStepes[0].id; - //UIMgr.HidePanel(); - //GameManager.UIMgr.HidePanel(); GameManager.UIMgr.HidePanel(); - GameManager.EventMgr.EventTrigger(Enum_EventType.UpdateProgress, 0.9f); - //if (GameManager.RunModelMgr.ModeType != E_ModeType.Study) + GameManager.EventMgr.EventTrigger(Enum_EventType.UpdateProgress, 0.8f); + if (GameManager.RunModelMgr.ModeType != E_ModeType.Study) { GameManager.RunModelMgr.startTime = DateTime.Now; GameManager.NetMgr.setTime(); @@ -405,7 +403,7 @@ public class GameManager : SingletonAutoMono { //修改本地文件 NetMgr.SaveInfo("1"); - EventMgr.EventTrigger(Enum_EventType.UpdateProgress, 0.9f); + EventMgr.EventTrigger(Enum_EventType.UpdateProgress, 0.8f); }); } StartCoroutine(AsyncSecurityCheck()); @@ -473,19 +471,19 @@ public class GameManager : SingletonAutoMono }); } -//#if UNITY_EDITOR -// void OnGUI() -// { -// // 设置GUI样式(可选) -// GUIStyle style = new GUIStyle(); -// style.fontSize = 20; -// style.normal.textColor = Color.red; + //#if UNITY_EDITOR + // void OnGUI() + // { + // // 设置GUI样式(可选) + // GUIStyle style = new GUIStyle(); + // style.fontSize = 20; + // style.normal.textColor = Color.red; -// // 在屏幕上绘制调试信息 -// GUILayout.Label(" " + SecurityCheck.instance.debugStr + "\n " + SecurityCheck.instance.read + "/" + SecurityCheck.instance.total, style); -// GUILayout.Label(" " + debugInfo, style); -// } -//#endif + // // 在屏幕上绘制调试信息 + // GUILayout.Label(" " + SecurityCheck.instance.debugStr + "\n " + SecurityCheck.instance.read + "/" + SecurityCheck.instance.total, style); + // GUILayout.Label(" " + debugInfo, style); + // } + //#endif /// /// 学习调用 @@ -537,7 +535,7 @@ public class GameManager : SingletonAutoMono public async void OnRefreshToken() { while (true) - { + { UnityEngine.Debug.Log("NetMgr.Get(tokenUrl)11111111"); await NetMgr.Get(tokenUrl); UnityEngine.Debug.Log("NetMgr.Get(tokenUrl)"); diff --git a/Assets/Template/Scripts/Project/Manager/ReconnectMgr.cs b/Assets/Template/Scripts/Project/Manager/ReconnectMgr.cs index b482e43..fbaf81b 100644 --- a/Assets/Template/Scripts/Project/Manager/ReconnectMgr.cs +++ b/Assets/Template/Scripts/Project/Manager/ReconnectMgr.cs @@ -78,7 +78,7 @@ public class ReconnectMgr : SingletonMono UserExamStat.allSubScore.Add(sub); }; //泡ڶϢ - UserExamStat.currentSceneOtherInfo = scoreBase.SaveSceneBufferList(); + //UserExamStat.currentSceneOtherInfo = scoreBase.SaveSceneBufferList(); } //¼װϢ UserExamStat.allToolAndMaterial.Clear(); @@ -287,7 +287,7 @@ public class ReconnectMgr : SingletonMono } } scoreBase.setCurrentScore(UserExamStat.currentScore); - scoreBase.LoadSceneBufferList(UserExamStat.currentSceneOtherInfo); + //scoreBase.LoadSceneBufferList(UserExamStat.currentSceneOtherInfo); } }); }