From eeb98682544d35fd7b4a7cc503e1a1d4fe8f8755 Mon Sep 17 00:00:00 2001 From: YangHua <1475658476@qq.com> Date: Sun, 28 Jan 2024 17:13:46 +0800 Subject: [PATCH] ewq --- Assets/Zion/Scripts/Adam/GameManager.cs | 5 ++--- Assets/Zion/Scripts/Adam/Utility/GlobalFlag.cs | 2 +- Assets/Zion/Scripts/HighPriorityTarget.cs | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Assets/Zion/Scripts/Adam/GameManager.cs b/Assets/Zion/Scripts/Adam/GameManager.cs index b0e95aa1..87956c09 100644 --- a/Assets/Zion/Scripts/Adam/GameManager.cs +++ b/Assets/Zion/Scripts/Adam/GameManager.cs @@ -44,8 +44,6 @@ public class GameManager : MonoSingleton // Start is called before the first frame update private void Awake() { - GlobalFlag.blueOrRed = 1; - Debug.Log(GlobalFlag.blueOrRed); postureBtn.onClick.AddListener(() => { ChangeView(0); @@ -147,7 +145,6 @@ public class GameManager : MonoSingleton ///04 student 03 teacher if (GlobalFlag.currentUser.role_code == "04") { - GlobalFlag.blueOrRed = 4; Teacher.gameObject.SetActive(false); student.gameObject.SetActive(true); GlobalFlag.isStartRehearsing = (UIBootstrap.Instance.GetRoomStateById(GlobalFlag.roomID) == 1); @@ -159,6 +156,7 @@ public class GameManager : MonoSingleton } if (GlobalFlag.currentUser.role_code == "03") { + GlobalFlag.blueOrRed = 3; Teacher.gameObject.SetActive(true); student.gameObject.SetActive(false); spt.GetComponent().cullingMask = -1; @@ -176,6 +174,7 @@ public class GameManager : MonoSingleton AddPlayers(spt); DeviceManager.Instance.OnInit(); DeviceManager.Instance.isStartRehearsing = GlobalFlag.isStartRehearsing; + Debug.Log(" GlobalFlag.blueOrRed----"+ GlobalFlag.blueOrRed); } diff --git a/Assets/Zion/Scripts/Adam/Utility/GlobalFlag.cs b/Assets/Zion/Scripts/Adam/Utility/GlobalFlag.cs index 1bbc4f23..3274b2e4 100644 --- a/Assets/Zion/Scripts/Adam/Utility/GlobalFlag.cs +++ b/Assets/Zion/Scripts/Adam/Utility/GlobalFlag.cs @@ -26,5 +26,5 @@ public class GlobalFlag /// /// 红方蓝方 /// - public static int blueOrRed; + public static int blueOrRed = -1; } diff --git a/Assets/Zion/Scripts/HighPriorityTarget.cs b/Assets/Zion/Scripts/HighPriorityTarget.cs index 8a31cf6c..eeb33666 100644 --- a/Assets/Zion/Scripts/HighPriorityTarget.cs +++ b/Assets/Zion/Scripts/HighPriorityTarget.cs @@ -175,7 +175,6 @@ public class HighPriorityTarget : MonoBehaviour KeyObjectiveUI.transform.LookAt(Camera.main.transform); if (GlobalFlag.blueOrRed == 1) { - if (Input.GetMouseButtonDown(0)) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);