dronkowitz

HintText.cs

Aug 18th, 2021 (edited)
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using TMPro;
  5. public class HintText : MonoBehaviour
  6. {
  7.     public TMP_Text hintText;
  8.     public GameObject GameHint;
  9.     public float hintTime;
  10.     public void ShowHint(string hint)
  11.     {
  12.        
  13.     }
  14.  
  15.     public void OnTriggerEnter(Collider other)
  16.     {
  17.         StartCoroutine(HintTimer());
  18.     }
  19.     public IEnumerator HintTimer()
  20.     {
  21.         GameHint.SetActive(true);
  22.         GameHint.SetActive(false);
  23.         yield return new WaitForSeconds(hintTime);
  24.     }
  25. }
  26.  
Add Comment
Please, Sign In to add comment