qww
This commit is contained in:
parent
2f341e93d8
commit
e1e44e8b4b
|
@ -55,7 +55,8 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
satelliteImagery.SetActive(false);
|
if (satelliteImagery != null)
|
||||||
|
satelliteImagery.SetActive(false);
|
||||||
postureBtn.onClick.AddListener(() =>
|
postureBtn.onClick.AddListener(() =>
|
||||||
{
|
{
|
||||||
satelliteImagery.SetActive(false);
|
satelliteImagery.SetActive(false);
|
||||||
|
@ -79,7 +80,7 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
spt.transform.position = redSpawnPos.position;
|
spt.transform.position = redSpawnPos.position;
|
||||||
spt.transform.eulerAngles = redSpawnPos.eulerAngles;
|
spt.transform.eulerAngles = redSpawnPos.eulerAngles;
|
||||||
spt.gameObject.SetActive(true);
|
spt.gameObject.SetActive(true);
|
||||||
spt.GetComponent<Camera>().cullingMask = ~(1 << 12) + ~(1 << 16) + ~(1 << 17) + ~(1 << 18) + ~(1 << 19) + ~(1 << 20) + ~(1 << 21) + ~(1 << 22);
|
spt.GetComponent<Camera>().cullingMask = ~(1 << 12);
|
||||||
//spt.GetComponent<Camera>().cullingMask = ~(1 << 15);
|
//spt.GetComponent<Camera>().cullingMask = ~(1 << 15);
|
||||||
AdamThinkDevicesData.DataItem diTemp = UIBootstrap.Instance.GetDeviceByName("蜂群无人机");
|
AdamThinkDevicesData.DataItem diTemp = UIBootstrap.Instance.GetDeviceByName("蜂群无人机");
|
||||||
if (diTemp.device_count > 0)
|
if (diTemp.device_count > 0)
|
||||||
|
@ -109,7 +110,7 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
spt.transform.position = blueSpawnPos.position;
|
spt.transform.position = blueSpawnPos.position;
|
||||||
spt.transform.eulerAngles = blueSpawnPos.eulerAngles;
|
spt.transform.eulerAngles = blueSpawnPos.eulerAngles;
|
||||||
spt.gameObject.SetActive(true);
|
spt.gameObject.SetActive(true);
|
||||||
spt.GetComponent<Camera>().cullingMask = ~(1 << 11) + ~(1 << 16) + ~(1 << 17) + ~(1 << 18) + ~(1 << 19) + ~(1 << 20) + ~(1 << 21) + ~(1 << 22);
|
spt.GetComponent<Camera>().cullingMask = ~(1 << 11);
|
||||||
if (UIBootstrap.Instance.GetDeviceByName("探测雷达").device_count > 0)
|
if (UIBootstrap.Instance.GetDeviceByName("探测雷达").device_count > 0)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < UIBootstrap.Instance.GetDeviceByName("探测雷达").device_count; i++)
|
for (int i = 0; i < UIBootstrap.Instance.GetDeviceByName("探测雷达").device_count; i++)
|
||||||
|
@ -162,7 +163,6 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
Teacher.gameObject.SetActive(false);
|
Teacher.gameObject.SetActive(false);
|
||||||
student.gameObject.SetActive(true);
|
student.gameObject.SetActive(true);
|
||||||
GlobalFlag.isStartRehearsing = (UIBootstrap.Instance.GetRoomStateById(GlobalFlag.roomID) == 1);
|
GlobalFlag.isStartRehearsing = (UIBootstrap.Instance.GetRoomStateById(GlobalFlag.roomID) == 1);
|
||||||
Debug.Log($"<color=red>isStartRehearsing={ GlobalFlag.isStartRehearsing}</color>");
|
|
||||||
if (GlobalFlag.isStartRehearsing)
|
if (GlobalFlag.isStartRehearsing)
|
||||||
{
|
{
|
||||||
spt.GetComponent<Camera>().cullingMask = -1;
|
spt.GetComponent<Camera>().cullingMask = -1;
|
||||||
|
@ -188,7 +188,6 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
AddPlayers(spt);
|
AddPlayers(spt);
|
||||||
DeviceManager.Instance.OnInit();
|
DeviceManager.Instance.OnInit();
|
||||||
DeviceManager.Instance.isStartRehearsing = GlobalFlag.isStartRehearsing;
|
DeviceManager.Instance.isStartRehearsing = GlobalFlag.isStartRehearsing;
|
||||||
Debug.Log(" GlobalFlag.blueOrRed----" + GlobalFlag.blueOrRed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -203,6 +202,7 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
if (GlobalFlag.isStartRehearsing) return;
|
||||||
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) == "0" && Input.GetMouseButtonDown(0))
|
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) == "0" && Input.GetMouseButtonDown(0))
|
||||||
{
|
{
|
||||||
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||||
|
@ -377,7 +377,6 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
{
|
{
|
||||||
RoomState roomState = await AsyncWebReq.Post<RoomState>(Url_UpdateRoomState + GlobalFlag.roomID + "&state=1", null);
|
RoomState roomState = await AsyncWebReq.Post<RoomState>(Url_UpdateRoomState + GlobalFlag.roomID + "&state=1", null);
|
||||||
|
|
||||||
Debug.Log($"<color=red>GamemanagerRoomState={ roomState.message}</color>");
|
|
||||||
if (roomState.message == "success")
|
if (roomState.message == "success")
|
||||||
{
|
{
|
||||||
GlobalFlag.isStartRehearsing = true;
|
GlobalFlag.isStartRehearsing = true;
|
||||||
|
|
Loading…
Reference in New Issue