33 lines
859 B
C#
33 lines
859 B
C#
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.");
|
|
}
|
|
}
|
|
} |