mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-04-14 04:45:52 -05:00
25 lines
512 B
C#
25 lines
512 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class Tooltip : MonoBehaviour
|
|
{
|
|
|
|
private Text tooltipText;
|
|
|
|
private void Start(){
|
|
tooltipText = transform.Find("Text").GetComponent<Text>();
|
|
HideTooltip();
|
|
}
|
|
|
|
public void ShowTooltip(string curTooltip){
|
|
this.gameObject.SetActive(true);
|
|
tooltipText.text = curTooltip;
|
|
}
|
|
|
|
public void HideTooltip(){
|
|
this.gameObject.SetActive(false);
|
|
}
|
|
}
|