天津23维预案
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.
 
 
 
 
 
 

42 lines
1.3 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
using AX.MessageSystem;
using AX.TrackRecord;
public class NodeLoadHints : MonoBehaviour, IPointerClickHandler
{
/// <summary>
/// 用于加载节点显示节点名称和节点简介的
/// 点击UI才开始回放节点
/// </summary>
/// <param name="eventData"></param>
//private Text Name;
private Text Intro;
void Awake()
{
//Name = transform.Find("Text").GetComponent<Text>();
Intro= transform.Find("Scroll View/Viewport/Text").GetComponent<Text>();
MessageDispatcher.AddListener("NodeLoadHints", nodeLoadHints);
this.gameObject.SetActive(false);
}
public void nodeLoadHints(IMessage mes)
{
this.gameObject.SetActive(true);
GetComponent<RectTransform>().localPosition = new Vector2(0f, 230f);
Intro.text = LoadManager.Instance.record_Load.Intro;
AutoBrowsing.instance.GetMessage(this.gameObject, 5f, false);
}
public void OnPointerClick(PointerEventData eventData)
{
NodeSet.Instance.BecauseClickLoadNode();
this.gameObject.SetActive(false);
}
void OnDestroy()
{
MessageDispatcher.RemoveListener("NodeLoadHints", nodeLoadHints);
}
}