Scriptum/Assets/DisplayExpStatus.cs

30 lines
645 B
C#
Raw Normal View History

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