You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
622 B
28 lines
622 B
2 years ago
|
using Game;
|
||
|
using Global;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.SceneManagement;
|
||
|
using UnityEngine.UIElements;
|
||
|
|
||
|
namespace Menu {
|
||
|
public class MainUI : MonoBehaviour {
|
||
|
|
||
|
private VisualElement root;
|
||
|
public RoomUI roomUI;
|
||
|
public MainMenuUI mainMenuUI;
|
||
|
|
||
|
public static MainUI Instance { get; private set; }
|
||
|
|
||
|
private void Awake() {
|
||
|
Instance = this;
|
||
|
|
||
|
root = GetComponent<UIDocument>().rootVisualElement;
|
||
|
mainMenuUI = new MainMenuUI{Root = root.Q<TemplateContainer>("MainMenu").contentContainer};
|
||
|
roomUI = new RoomUI{Root = root.Q("Room")};
|
||
|
|
||
|
mainMenuUI.ResetAndShow();
|
||
|
roomUI.Hide();
|
||
|
}
|
||
|
}
|
||
|
}
|