feat():完成3种模式的基本运行框架
This commit is contained in:
33
Assets/Script/Gameplay/UI/PlayerWatchModeViewer.cs
Normal file
33
Assets/Script/Gameplay/UI/PlayerWatchModeViewer.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using Core;
|
||||
using Gameplay.Player;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class PlayerWatchModeViewer : UIBase
|
||||
{
|
||||
private PlayerWatchModeController watchModeController;
|
||||
[SerializeField] private 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.");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user