fix(ConnectUI): 让连接UI正确显示
This commit is contained in:
@@ -9,13 +9,14 @@ namespace UI
|
||||
{
|
||||
public class PlayerConnectViewer : UIBase
|
||||
{
|
||||
public TMP_Text inputText;
|
||||
public TMP_Text outputText;
|
||||
public TMP_Text pointBText;
|
||||
public TMP_Text pointAText;
|
||||
private PlayerConnectController _playerConnectController;
|
||||
private PlayerWatchModeController _playerWatchModeController;
|
||||
|
||||
private void Awake()
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
ControllerLocator.Instance.TryGetWait<PlayerConnectController>(OnGetConnectController);
|
||||
ControllerLocator.Instance.TryGetWait<PlayerWatchModeController>(OnGetWatchModeController);
|
||||
}
|
||||
@@ -32,18 +33,18 @@ namespace UI
|
||||
private void UpdateInputText(IConnectable input)
|
||||
{
|
||||
string text = input != null ? input.GetConnectableName() : "None";
|
||||
if (inputText != null)
|
||||
if (pointBText != null)
|
||||
{
|
||||
inputText.text = "Input: " + text;
|
||||
pointBText.text = "pointB: " + text;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateOutputText(IConnectable output)
|
||||
{
|
||||
string text = output != null ? output.GetConnectableName() : "None";
|
||||
if (outputText != null)
|
||||
if (pointAText != null)
|
||||
{
|
||||
outputText.text = "Output: " + text;
|
||||
pointAText.text = "pointA: " + text;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user