You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.2 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UI : MonoBehaviour
{
//机器人
bool StateOfJQR;
public GameObject jqr;
public GameObject ipad;
//窗帘
private void Awake()
{
StateOfJQR = false;
}
public void JQR() {
if (StateOfJQR)
{
StateOfJQR = false;
jqr.GetComponent<SaoDiJiQi>().updateState();
}
else {
StateOfJQR = true;
jqr.GetComponent<SaoDiJiQi>().updateState();
}
}
private void Update()
{
if (Input.GetKeyDown(KeyCode.Escape)) {
print("按下esc");
ipad.SetActive(false);
GameManager.GetInstance().IsPlayerMove = true;
GameManager.GetInstance().IsOpenUI = false;
}
if (Input.GetKeyDown(KeyCode.M)&&GameManager.GetInstance().IsHasIpad)
{
print("打开ipad");
GameManager.GetInstance().IsPlayerMove = false;
GameManager.GetInstance().IsOpenUI = true;
ipad.SetActive(true);
//Resetipad();
}
}
private void Resetipad()
{
}
}