20 lines
416 B
C#
20 lines
416 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class UIGameplay : MonoBehaviour
|
|
{
|
|
public Enemy Enemy;
|
|
public Image enemyHealth;
|
|
public TextMeshProUGUI textHealth;
|
|
|
|
private void Update()
|
|
{
|
|
enemyHealth.fillAmount = Enemy.health / Enemy.maxHealth;
|
|
textHealth.text = Enemy.health + "%";
|
|
}
|
|
}
|