(client) chore
This commit is contained in:
21
Client/Assets/Scripts/UI/PlayerStateUI.cs
Normal file
21
Client/Assets/Scripts/UI/PlayerStateUI.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class PlayerStateUI:MonoBehaviour,Base.ITick
|
||||
{
|
||||
[SerializeField] private BarUI focusedEntityHP;
|
||||
[SerializeField] private BarUI lastEntityHP;
|
||||
|
||||
|
||||
public void Tick()
|
||||
{
|
||||
var focusedEntity = Program.Instance.focusedEntity;
|
||||
if (focusedEntity)
|
||||
{
|
||||
focusedEntityHP.Progress = (float)focusedEntity.attributes.health/focusedEntity.entityDef.attributes.health;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user