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.
26 lines
574 B
26 lines
574 B
1 year ago
|
using UnityEngine;
|
||
|
using UnityEngine.EventSystems;
|
||
|
|
||
|
public class Remarks : MonoBehaviour
|
||
|
{
|
||
|
private PowerController powerController;
|
||
|
|
||
|
private void Start()
|
||
|
{
|
||
|
powerController = transform.parent.parent.GetComponent<PowerController>();
|
||
|
}
|
||
|
|
||
|
private void OnMouseDown()
|
||
|
{
|
||
|
if (!EventSystem.current.IsPointerOverGameObject())
|
||
|
{
|
||
|
UIManager.Instance.Show<RemarksPanel>(SetInfo);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void SetInfo()
|
||
|
{
|
||
|
UIManager.Instance.GetView<RemarksPanel>().Info.text = powerController.Remarks;
|
||
|
}
|
||
|
}
|