40 lines
756 B
C#
40 lines
756 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
|
|
[AddComponentMenu("红外监测")]
|
|
public class InfraredUI : CabinetUIBase
|
|
{
|
|
public static Transform Camera;
|
|
public Transform maodian;
|
|
|
|
void Start()
|
|
{
|
|
Camera = UnityEngine.Camera.main.transform;
|
|
}
|
|
|
|
|
|
void Update()
|
|
{
|
|
maodian.transform.eulerAngles = Camera.eulerAngles;
|
|
|
|
}
|
|
|
|
public override void OnMenuChanged(Menu menu)
|
|
{
|
|
base.OnMenuChanged(menu);
|
|
if (menu == Menu.M_全景监控_红外监测)
|
|
{
|
|
gameObject.SetActive(true);
|
|
}
|
|
else
|
|
{
|
|
gameObject.SetActive(false);
|
|
}
|
|
}
|
|
}
|