防城港单机
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.
 
 
 
 

50 lines
1.2 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using AX.MessageSystem;
public class NodeDetailShow : MonoBehaviour, IPointerClickHandler
{
public Text detail;
public ReplayManager replayManager;
public bool control = false;
private float time;
// Use this for initialization
void Start()
{
}
// Update is called once per frame
void Update()
{
if (control)
{
time -= Time.deltaTime;
if (time < 0)
{
gameObject.SetActive(false);
control = false;
if (replayManager.playOrPause.isOn)//增加判断,防止在显示提示信息的时候点击了暂停播放
{
replayManager.Play();
}
}
}
}
public void SetUI(string text)
{
detail.text = text;
time = 5;
control = true;
}
public void OnPointerClick(PointerEventData eventData)
{
gameObject.SetActive(false);
control = false;
replayManager.Play();
}
}