feat():完成3种模式的基本运行框架

This commit is contained in:
2025-10-18 08:55:38 +08:00
parent 3d03c59dc3
commit 345930843d
39 changed files with 909 additions and 427 deletions

View File

@@ -0,0 +1,32 @@
using System;
using Core;
using Gameplay.Player;
using UnityEngine;
using UnityEngine.UI;
namespace UI
{
public class PlayerHpViewer : UIBase
{
private PlayerController _playerController;
public Text hpText;
private void Awake()
{
ControllerLocator.Instance.TryGetWait<PlayerController>(OnGet);
}
private void Update()
{
if (_playerController != null)
{
hpText.text = "HP: " + _playerController.CurrentHealth;
}
}
private void OnGet(PlayerController playerController)
{
_playerController = playerController;
}
}
}