Compare commits

..

No commits in common. "5101cb63bd927a492094b90a13427b4ec3bc3beb" and "840a21a6f87231d104859040d1dc1a6b8978b428" have entirely different histories.

3 changed files with 12 additions and 24 deletions

View File

@ -780,7 +780,7 @@ public class test : MonoBehaviour
} }
if (userJoinResponse.MessageType == 11)//·¿¼ä¿ªÊ¼ if (userJoinResponse.MessageType == 11)//·¿¼ä¿ªÊ¼
{ {
test111.instance.Oppanel();
} }
break; break;

View File

@ -145,7 +145,6 @@ public class Starthost : MonoBehaviour
image.gameObject.SetActive(true); image.gameObject.SetActive(true);
ready.gameObject.SetActive(false); ready.gameObject.SetActive(false);
test.JoinRoom(ReadRoom.instance.roomid); test.JoinRoom(ReadRoom.instance.roomid);
test.PlayerReady(ReadRoom.instance.roomid, true);
} }
// 停止计时并重置时间显示的方法 // 停止计时并重置时间显示的方法
public void StopTimer() public void StopTimer()

View File

@ -4,7 +4,6 @@ using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
public class test111 : MonoBehaviour public class test111 : MonoBehaviour
{ {
public static test111 instance;
// Start is called before the first frame update // Start is called before the first frame update
public Canvas canvas1; public Canvas canvas1;
public Camera camera; public Camera camera;
@ -13,34 +12,24 @@ public class test111 : MonoBehaviour
void Start() void Start()
{ {
instance = this; if (ReadRoom.instance.isenter)
{
Debug.Log(ReadRoom.instance.isenter);
canvas1.gameObject.SetActive(false);
camera.gameObject.SetActive(false);
canvas2.gameObject.SetActive(true);
camera1.gameObject.SetActive(true);
}
else
{
canvas1.gameObject.SetActive(false);
camera.gameObject.SetActive(false);
canvas2.gameObject.SetActive(true);
camera1.gameObject.SetActive(true);
}
public void Oppanel()
{
Debug.LogError("·¿¼ä¿ªÊ¼ÓÎÏ·");
if (ReadRoom.instance.isenter)
{
Debug.Log(ReadRoom.instance.isenter);
canvas1.gameObject.SetActive(false);
camera.gameObject.SetActive(true);
canvas2.gameObject.SetActive(false);
camera1.gameObject.SetActive(false);
}
else
{
canvas1.gameObject.SetActive(false); canvas1.gameObject.SetActive(false);
camera.gameObject.SetActive(false); camera.gameObject.SetActive(false);
canvas2.gameObject.SetActive(true); canvas2.gameObject.SetActive(true);
camera1.gameObject.SetActive(true); camera1.gameObject.SetActive(true);
} }
} }
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {