接入 Hud 输入提示并完善 InputModule 提示映射
This commit is contained in:
@@ -35,9 +35,27 @@ namespace SepCore.UI
|
||||
|
||||
[SerializeField] private TMP_Text _enemyCountText;
|
||||
private EnemyManagerComponent _enemy;
|
||||
|
||||
|
||||
[SerializeField] private GameObject _movePromptRoot;
|
||||
[SerializeField] private TMP_Text _movePromptText;
|
||||
|
||||
public void RefreshUI(HudContext hudContext)
|
||||
{
|
||||
RefreshMovePrompt(hudContext?.MovePrompt);
|
||||
}
|
||||
|
||||
public void RefreshMovePrompt(string prompt)
|
||||
{
|
||||
bool visible = !string.IsNullOrEmpty(prompt);
|
||||
if (_movePromptRoot != null)
|
||||
{
|
||||
_movePromptRoot.SetActive(visible);
|
||||
}
|
||||
|
||||
if (_movePromptText != null)
|
||||
{
|
||||
_movePromptText.text = prompt;
|
||||
}
|
||||
}
|
||||
|
||||
#region FSM
|
||||
|
||||
Reference in New Issue
Block a user