_xiaofang/xiaofang/Assets/Res/gsj/test111.cs

36 lines
818 B
C#
Raw Normal View History

2024-12-26 03:46:07 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class test111 : MonoBehaviour
{
// Start is called before the first frame update
public Canvas canvas1;
public Canvas canvas2;
public Camera camera1;
void Start()
{
2024-12-29 17:50:20 +08:00
if (ReadRoom.instance.isenter)
2024-12-26 03:46:07 +08:00
{
2024-12-29 14:44:56 +08:00
Debug.Log(ReadRoom.instance.isenter);
2024-12-26 03:46:07 +08:00
canvas1.gameObject.SetActive(false);
canvas2.gameObject.SetActive(true);
2024-12-26 04:18:42 +08:00
camera1.gameObject.SetActive(true);
2024-12-26 03:46:07 +08:00
}
2024-12-29 14:44:56 +08:00
else
{
2024-12-29 17:50:20 +08:00
canvas1.gameObject.SetActive(false);
canvas2.gameObject.SetActive(true);
camera1.gameObject.SetActive(true);
2024-12-29 14:44:56 +08:00
}
2024-12-26 03:46:07 +08:00
}
2024-12-29 17:50:20 +08:00
// Update is called once per frame
void Update()
{
}
2024-12-26 03:46:07 +08:00
}