This commit is contained in:
YangHua 2024-01-28 17:13:46 +08:00
parent a30d997487
commit eeb9868254
3 changed files with 3 additions and 5 deletions

View File

@ -44,8 +44,6 @@ public class GameManager : MonoSingleton<GameManager>
// 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<GameManager>
///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<GameManager>
}
if (GlobalFlag.currentUser.role_code == "03")
{
GlobalFlag.blueOrRed = 3;
Teacher.gameObject.SetActive(true);
student.gameObject.SetActive(false);
spt.GetComponent<Camera>().cullingMask = -1;
@ -176,6 +174,7 @@ public class GameManager : MonoSingleton<GameManager>
AddPlayers(spt);
DeviceManager.Instance.OnInit();
DeviceManager.Instance.isStartRehearsing = GlobalFlag.isStartRehearsing;
Debug.Log(" GlobalFlag.blueOrRed----"+ GlobalFlag.blueOrRed);
}

View File

@ -26,5 +26,5 @@ public class GlobalFlag
/// <summary>
/// 红方蓝方
/// </summary>
public static int blueOrRed;
public static int blueOrRed = -1;
}

View File

@ -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);