Scriptum/Assets/DisplayHealthStatus.cs
2023-01-10 04:21:36 +01:00

34 lines
686 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DisplayHealthStatus : MonoBehaviour
{
public GameObject healthText;
public static KeyCode keyToHealth;
private void Start()
{
DisplayExpStatus.keyToExp = (KeyCode) System.Enum.Parse(typeof(KeyCode), PlayerPrefs.GetString("EXP HEALTH"));
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(keyToHealth))
{
healthText.SetActive(true);
}
if (Input.GetKeyUp(keyToHealth))
{
healthText.SetActive(false);
}
}
}