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;
|
||
|
}
|
||
|
}
|