mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-20 02:57:12 +08:00
(client) feat:实现热重载,实现多维度,实现武器,实现掉落物,实现状态UI,实现攻击AI (#44)
Co-authored-by: zzdxxz <2079238449@qq.com> Co-committed-by: zzdxxz <2079238449@qq.com>
This commit is contained in:
24
Client/Assets/Scripts/UI/PlayerStateUI.cs
Normal file
24
Client/Assets/Scripts/UI/PlayerStateUI.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
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 && focusedEntity.entityDef != null)
|
||||
{
|
||||
focusedEntityHP.Progress =
|
||||
(float)focusedEntity.attributes.health / focusedEntity.entityDef.attributes.health;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user