开始房间
This commit is contained in:
parent
0c7f8fa2ad
commit
6defaa66fe
@ -780,7 +780,7 @@ public class test : MonoBehaviour
|
||||
}
|
||||
if (userJoinResponse.MessageType == 11)//·¿¼ä¿ªÊ¼
|
||||
{
|
||||
|
||||
test111.instance.Oppanel();
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -145,6 +145,7 @@ public class Starthost : MonoBehaviour
|
||||
image.gameObject.SetActive(true);
|
||||
ready.gameObject.SetActive(false);
|
||||
test.JoinRoom(ReadRoom.instance.roomid);
|
||||
test.PlayerReady(ReadRoom.instance.roomid, true);
|
||||
}
|
||||
// 停止计时并重置时间显示的方法
|
||||
public void StopTimer()
|
||||
|
@ -4,6 +4,7 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
public class test111 : MonoBehaviour
|
||||
{
|
||||
public static test111 instance;
|
||||
// Start is called before the first frame update
|
||||
public Canvas canvas1;
|
||||
public Camera camera;
|
||||
@ -12,24 +13,34 @@ public class test111 : MonoBehaviour
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (ReadRoom.instance.isenter)
|
||||
{
|
||||
Debug.Log(ReadRoom.instance.isenter);
|
||||
instance = this;
|
||||
|
||||
|
||||
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);
|
||||
camera.gameObject.SetActive(false);
|
||||
canvas2.gameObject.SetActive(true);
|
||||
camera1.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user