79 lines
2.1 KiB
C#
79 lines
2.1 KiB
C#
using DefaultNamespace.ProcessMode;
|
|
using Framework.Manager;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.UI;
|
|
using static InterfaceManager;
|
|
/// <summary>
|
|
/// 盖章确认
|
|
/// </summary>
|
|
public class UI_StampConfirmation : MonoBehaviour, IPointerClickHandler
|
|
{
|
|
/// <summary>
|
|
/// 是否已经盖章确认
|
|
/// </summary>
|
|
public bool IsClick = false;
|
|
/// <summary>
|
|
/// 自身的文本
|
|
/// </summary>
|
|
private Text text;
|
|
/// <summary>
|
|
/// 校验
|
|
/// </summary>
|
|
private Button check;
|
|
/// <summary>
|
|
/// 取消校验
|
|
/// </summary>
|
|
private Button cancelcheck;
|
|
/// <summary>
|
|
/// 分数
|
|
/// </summary>
|
|
public int scroe;
|
|
/// <summary>
|
|
/// 红色盖章
|
|
/// </summary>
|
|
private GameObject circle;
|
|
|
|
public void OnPointerClick(PointerEventData eventData)
|
|
{
|
|
//判断是否右键点击该检查点
|
|
if (eventData.button == PointerEventData.InputButton.Right)
|
|
{
|
|
UI_StampConfirmationManager.Instance.Checkobject.transform.position = Input.mousePosition;
|
|
UI_StampConfirmationManager.Instance.Checkobject.SetActive(true);
|
|
check.onClick.RemoveAllListeners();
|
|
cancelcheck.onClick.RemoveAllListeners();
|
|
check.onClick.AddListener(() =>
|
|
{
|
|
IsClick = true;
|
|
LoadTriggerNextGuide();
|
|
//MotionFramework.MotionEngine.GetModule<ProcessManager>().HandleClick("");
|
|
circle.SetActive(true);
|
|
});
|
|
cancelcheck.onClick.AddListener(() =>
|
|
{
|
|
IsClick = false;
|
|
circle.SetActive(false);
|
|
});
|
|
}
|
|
}
|
|
|
|
void Start()
|
|
{
|
|
text = GetComponent<Text>();
|
|
check = UI_StampConfirmationManager.Instance.Checkobject.transform.GetChild(0).GetComponent<Button>();
|
|
cancelcheck = UI_StampConfirmationManager.Instance.Checkobject.transform.GetChild(1).GetComponent<Button>();
|
|
circle = transform.GetChild(0).gameObject;
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 是否点击了校验
|
|
/// </summary>
|
|
public void CheckRight()
|
|
{
|
|
|
|
}
|
|
|
|
}
|