2025-10-18 08:55:38 +08:00
|
|
|
using System;
|
|
|
|
using Core;
|
2025-10-20 10:12:07 +08:00
|
|
|
using Script.Gameplay.Player;
|
2025-10-19 19:38:52 +08:00
|
|
|
using TMPro;
|
2025-10-18 08:55:38 +08:00
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
namespace UI
|
|
|
|
{
|
|
|
|
public class PlayerWatchModeViewer : UIBase
|
|
|
|
{
|
|
|
|
private PlayerWatchModeController watchModeController;
|
2025-10-19 19:38:52 +08:00
|
|
|
[SerializeField] private TMP_Text modeText;
|
2025-10-18 08:55:38 +08:00
|
|
|
|
|
|
|
private void Awake()
|
|
|
|
{
|
|
|
|
ControllerLocator.Instance.TryGetWait<PlayerWatchModeController>(OnGet);
|
|
|
|
}
|
2025-10-19 19:38:52 +08:00
|
|
|
|
2025-10-18 08:55:38 +08:00
|
|
|
private void OnGet(PlayerWatchModeController watchModeCtrl)
|
|
|
|
{
|
|
|
|
watchModeController = watchModeCtrl;
|
2025-10-19 19:38:52 +08:00
|
|
|
modeText.text = "Watch Mode: " + watchModeController.CurrentWatchMode;
|
|
|
|
watchModeController.OnEnterWatchMode += mode => modeText.text = "Watch Mode: " + mode;
|
2025-10-18 08:55:38 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|