private void Init() { NativeMenuManager = new NativeMenuManager(); MainMenu = new NativeMenu("Grand Theft Space", $"VERSION {CoreScript.VersionNum}", MenuBannerType.SmuglersHangar); MainMenu.Init(); NativeMenuManager.AddMenu(MainMenu); LevelSelectionMenu = new LevelSelectionMenu(this); LevelSelectionMenu.AddToMenu(MainMenu, NativeMenuManager); }
// Use this for initialization void Start() { frontMenu = GetComponentInChildren <FrontMenu>(); if (frontMenu == null) { Debug.LogError("Front menu not found!"); } levelSelectionMenu = GetComponentInChildren <LevelSelectionMenu>(); if (levelSelectionMenu == null) { Debug.LogError("LevelSelectionMenu not found!"); } settings = GameObject.Find("Settings").GetComponent <Settings>(); if (settings == null) { Debug.LogError("Settings not found!"); } frontMenu.Show(); frontMenu.EGoToLevelSelection += LGoToLevelSelection; levelSelectionMenu.ELoadLevel += LLoadLevel; }