using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameManager : MonoBehaviour
{
///
/// 控制器
///
public static GameManager Instance;
///
/// 主视角
///
public Transform CameraMain;
///
/// 任务控制
///
private CameraMove cameraMove;
///
/// 是否显示UI
///
public bool isShowUI;
///
/// 主场景点位
///
public List MainPos = new List();
///
/// 所有点位
///
public List AllPos = new List();
///
/// 所有建筑模型
///
public List Architectures = new List();
///
/// 转场点
///
//public Transform cutToPos;
///
/// 转场
///
//public GameObject cutToObj;
public static CameraMove CameraMove { get { if (Instance.cameraMove == null) Instance.cameraMove = Instance.CameraMain.GetComponent(); return Instance.cameraMove; } }
private void Awake()
{
Instance = this;
}
//private void Update()
//{
// if (Input.GetMouseButtonDown(0))
// {
// Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
// RaycastHit hit;
// if (Physics.Raycast(ray, out hit))
// {
// if (hit.collider.CompareTag("distributionbox"))
// {
// Debug.Log("点击到了配电箱!");
// //前端方法: DistributionBox
// // 在这里编写你点击带有特定标签的碰撞体后的逻辑代码
// }
// }
// }
//}
///
/// 模型显示
///
///
public void ModerShow(string _ShowModerName)
{
Architectures.ForEach(x => x.SetActive(x.transform.name == _ShowModerName));
}
}