Scriptum/Assets/DisplayHealthStatus.cs

27 lines
468 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DisplayHealthStatus : MonoBehaviour
{
public GameObject healthText;
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Tab))
{
healthText.SetActive(true);
}
if (Input.GetKeyUp(KeyCode.Tab))
{
healthText.SetActive(false);
}
}
}