您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
21 行
509 B
21 行
509 B
using UnityEngine;
|
|
|
|
namespace LobbyRelaySample.UI
|
|
{
|
|
[RequireComponent(typeof(LocalGameStateObserver))]
|
|
public class GameStateVisibilityUI : ObserverPanel<LocalGameState>
|
|
{
|
|
[SerializeField]
|
|
GameState ShowThisWhen;
|
|
|
|
public override void ObservedUpdated(LocalGameState observed)
|
|
{
|
|
if (!ShowThisWhen.HasFlag(observed.State))
|
|
Hide();
|
|
else
|
|
{
|
|
Show();
|
|
}
|
|
}
|
|
}
|
|
}
|