feat(Connect): 完成连线基本玩法,

This commit is contained in:
2025-10-19 19:38:52 +08:00
parent e14e8925de
commit f3d73ab65a
34 changed files with 2528 additions and 988 deletions

View File

@@ -1,6 +1,7 @@
using System;
using Core;
using Gameplay.Player;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
@@ -9,25 +10,18 @@ namespace UI
public class PlayerWatchModeViewer : UIBase
{
private PlayerWatchModeController watchModeController;
[SerializeField] private Text modeText;
[SerializeField] private TMP_Text modeText;
private void Awake()
{
ControllerLocator.Instance.TryGetWait<PlayerWatchModeController>(OnGet);
}
private void Update()
{
if (watchModeController != null)
{
modeText.text = "Watch Mode: " + watchModeController.CurrentWatchMode.ToString();
}
}
private void OnGet(PlayerWatchModeController watchModeCtrl)
{
watchModeController = watchModeCtrl;
//Debug.Log("PlayerWatchModeViewer obtained PlayerWatchModeController.");
modeText.text = "Watch Mode: " + watchModeController.CurrentWatchMode;
watchModeController.OnEnterWatchMode += mode => modeText.text = "Watch Mode: " + mode;
}
}
}