mirror of
http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite.git
synced 2025-11-20 05:37:11 +08:00
(client) feat:健康给予,路径优化,结算界面,商店界面 (#60)
Co-authored-by: m0_75251201 <m0_75251201@noreply.gitcode.com> Reviewed-on: http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite/pulls/60
This commit is contained in:
44
Client/Assets/Scripts/UI/InformationUI.cs
Normal file
44
Client/Assets/Scripts/UI/InformationUI.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using Base;
|
||||
using Managers;
|
||||
using TMPro;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class InformationUI : UIBase, ITick
|
||||
{
|
||||
public TMP_Text entityInformation;
|
||||
public TMP_Text dimensionInformation;
|
||||
|
||||
public void Tick()
|
||||
{
|
||||
var focus = Program.Instance.FocusedEntity;
|
||||
if (focus)
|
||||
{
|
||||
var text = $"定义: {focus.entityDef.defName}\n" +
|
||||
$"派系: {focus.affiliation}\n" +
|
||||
$"属性: {focus.AttributesNow}\n" +
|
||||
$"状态:{focus.CurrentState}\n" +
|
||||
$"朝向:{focus.CurrentOrientation}\n";
|
||||
entityInformation.text = text;
|
||||
}
|
||||
|
||||
var focusDim = Program.Instance.FocusedDimension;
|
||||
if (focusDim)
|
||||
dimensionInformation.text =
|
||||
$"定义:{focusDim.dimensionDefinition.defName}\n" +
|
||||
$"实体总数:{EntityManager.Instance.GetAllEntities(focusDim.DimensionId).Length}";
|
||||
}
|
||||
|
||||
public override void Show()
|
||||
{
|
||||
base.Show();
|
||||
Clock.AddTick(this);
|
||||
}
|
||||
|
||||
public override void Hide()
|
||||
{
|
||||
base.Hide();
|
||||
Clock.RemoveTick(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user