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

50 lines
1.3 KiB
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
{
2024-12-29 20:25:37 +08:00
public static test111 instance;
2024-12-26 03:46:07 +08:00
// Start is called before the first frame update
public Canvas canvas1;
2024-12-29 18:02:49 +08:00
public Camera camera;
2024-12-26 03:46:07 +08:00
public Canvas canvas2;
public Camera camera1;
void Start()
{
2024-12-29 20:25:37 +08:00
instance = this;
2024-12-26 03:46:07 +08:00
canvas1.gameObject.SetActive(false);
2024-12-29 18:02:49 +08:00
camera.gameObject.SetActive(false);
2024-12-26 03:46:07 +08:00
canvas2.gameObject.SetActive(true);
2024-12-26 04:18:42 +08:00
camera1.gameObject.SetActive(true);
2024-12-29 20:25:37 +08:00
}
public void Oppanel()
{
Debug.LogError("<22><><EFBFBD>ʼ<E4BFAA><CABC>Ϸ");
if (ReadRoom.instance.isenter)
{
Debug.Log(ReadRoom.instance.isenter);
canvas1.gameObject.SetActive(false);
2025-01-03 11:59:14 +08:00
camera.gameObject.SetActive(false);
2025-01-03 14:34:57 +08:00
canvas2.gameObject.SetActive(true);
2025-01-03 11:59:14 +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);
2025-01-03 11:59:14 +08:00
camera.gameObject.SetActive(true);
canvas2.gameObject.SetActive(false);
camera1.gameObject.SetActive(false);
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
}