37 lines
882 B
C#
37 lines
882 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using PixelCrushers.DialogueSystem;
|
|
using TriangleNet;
|
|
using UnityEngine;
|
|
|
|
|
|
namespace Beyond {
|
|
public class DisplayInfo : MonoBehaviour
|
|
{
|
|
private string[] m_infoTable;
|
|
|
|
public void Display(int infoId, float delay = 0f)
|
|
{
|
|
if (infoId >= 0 && infoId < m_infoTable.Length)
|
|
Display(m_infoTable[infoId], delay);
|
|
else
|
|
{
|
|
Debug.LogError("DisplayInfo: infoID out of range");
|
|
}
|
|
}
|
|
|
|
|
|
public void Display(string txt, float delay)
|
|
{
|
|
StartCoroutine(DisplayRoutine(txt, delay));
|
|
}
|
|
|
|
IEnumerator DisplayRoutine(string txt, float delay)
|
|
{
|
|
yield return new WaitForSeconds(delay);
|
|
DialogueManager.ShowAlert(txt);
|
|
}
|
|
|
|
}
|
|
}
|