(client) feat:实现掉落物,UI显示,维度
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
@ -7,15 +8,17 @@ namespace UI
|
||||
{
|
||||
[SerializeField] private BarUI focusedEntityHP;
|
||||
[SerializeField] private BarUI lastEntityHP;
|
||||
|
||||
|
||||
|
||||
public void Tick()
|
||||
{
|
||||
var focusedEntity = Program.Instance.focusedEntity;
|
||||
if (focusedEntity)
|
||||
var focusedEntity = Program.Instance.FocusedEntity;
|
||||
if (focusedEntity && focusedEntity.entityDef != null)
|
||||
{
|
||||
focusedEntityHP.Progress = (float)focusedEntity.attributes.health/focusedEntity.entityDef.attributes.health;
|
||||
focusedEntityHP.Progress =
|
||||
(float)focusedEntity.attributes.health / focusedEntity.entityDef.attributes.health;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user