65 lines
1.4 KiB
C#
65 lines
1.4 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Unity.VisualScripting;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
using UnityEngine.UI;
|
|
|
|
public class Operatingkey : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
|
{
|
|
/// <summary>
|
|
/// 操作说明任务模式
|
|
/// </summary>
|
|
public GameObject 操作说明任务模式;
|
|
/// <summary>
|
|
/// 操作说明任务模式
|
|
/// </summary>
|
|
public GameObject 操作说明自由模式;
|
|
/// <summary>
|
|
/// Mask
|
|
/// </summary>
|
|
public GameObject Mask;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void OnPointerEnter(PointerEventData eventData)
|
|
{
|
|
//课程任务模式下触发得UI
|
|
if (GameManager.current_main_menu_type == MainMenuType.课程任务)
|
|
{
|
|
操作说明任务模式.SetActive(true);
|
|
}
|
|
else
|
|
{
|
|
操作说明自由模式.SetActive(true);
|
|
}
|
|
Mask.GetComponent<Mask>().enabled = true;
|
|
}
|
|
|
|
|
|
public void OnPointerExit(PointerEventData eventData)
|
|
{
|
|
//课程任务模式下触发得UI
|
|
if (GameManager.current_main_menu_type == MainMenuType.课程任务)
|
|
{
|
|
操作说明任务模式.SetActive(false);
|
|
}
|
|
else
|
|
{
|
|
操作说明自由模式.SetActive(false);
|
|
}
|
|
Mask.GetComponent<Mask>().enabled = false;
|
|
}
|
|
}
|
|
|
|
|