public void WeaponSelectAction() { ConfirmMenu confirmMenu = (ConfirmMenu)MenuManager.Instance.GetMenuByName(Strings.MenuStrings.CONFIRM); Action onYesAction = () => { string currentScene = SceneTracker.CurrentSceneName; Action loadWeaponSelectAction = () => { WeaponSelectMenu weaponMenu = (WeaponSelectMenu)MenuManager.Instance.GetMenuByName(Strings.MenuStrings.WEAPON_SELECT); weaponMenu.DefineNavigation(Strings.MenuStrings.MAIN, Strings.MenuStrings.LOAD); LoadMenu lm = (LoadMenu)MenuManager.Instance.GetMenuByName(Strings.MenuStrings.LOAD); lm.SetNavigation(currentScene); MenuManager.Instance.DoTransition(weaponMenu, Transition.SHOW, new Effect[] { Effect.EXCLUSIVE }); }; MenuManager.Instance.DoTransition(confirmMenu, Transition.HIDE, new Effect[] { }); LoadMenu loadMenu = (LoadMenu)MenuManager.Instance.GetMenuByName(Strings.MenuStrings.LOAD); loadMenu.SetNavigation(Strings.Scenes.ScenePaths.MainMenu, loadWeaponSelectAction); MenuManager.Instance.DoTransition(loadMenu, Transition.SHOW, new Effect[] { Effect.EXCLUSIVE }); }; Action onNoAction = () => { MenuManager.Instance.DoTransition(confirmMenu, Transition.HIDE, new Effect[] { Effect.INSTANT }); SelectInitialButton(); }; confirmMenu.DefineActions("This will end your current game. Are you sure?", onYesAction, onNoAction); MenuManager.Instance.DoTransition(confirmMenu, Transition.SHOW, new Effect[] { Effect.INSTANT }); }
private void TryLoadSelectedLevel() { if (SelectedLevelUI != null) { if (!SelectedLevelUI.levelData.isHathosLevel) { DataPersister.ActiveDataSave.FillWorkingLevelDataWithExistingLevelData(SelectedLevelUI.levelData.UniqueSteamName); } if (SceneTracker.IsCurrentSceneEditor) { levelDataManager.LoadSelectedLevel(); } else { string loadMenuName = Strings.MenuStrings.LOAD; WeaponSelectMenu weaponSelectMenu = (WeaponSelectMenu)MenuManager.Instance.GetMenuByName(Strings.MenuStrings.WEAPON_SELECT); weaponSelectMenu.DefineNavigation(Strings.MenuStrings.LevelEditor.LEVELSELECT_PLE_MENU, loadMenuName); LoadMenu loadMenu = (LoadMenu)MenuManager.Instance.GetMenuByName(loadMenuName); loadMenu.SetNavigation(IsHathosLevelSelected ? Strings.Scenes.ScenePaths.Arena : Strings.Scenes.ScenePaths.PlayerLevels); MenuManager.Instance.DoTransition(weaponSelectMenu, Transition.SHOW, new Effect[] { Effect.EXCLUSIVE }); } } }
public void WeaponSelectAction() { WeaponSelectMenu weaponMenu = (WeaponSelectMenu)MenuManager.Instance.GetMenuByName(Strings.MenuStrings.WEAPON_SELECT); weaponMenu.DefineNavigation(null, Strings.MenuStrings.LOAD); LoadMenu lm = (LoadMenu)MenuManager.Instance.GetMenuByName(Strings.MenuStrings.LOAD); lm.SetNavigation(SceneTracker.CurrentSceneName); EventSystem.Instance.TriggerEvent(Strings.Events.WEAPONS_SELECT_FROM_STAGE_OVER); MenuManager.Instance.DoTransition(weaponMenu, Transition.SHOW, new Effect[] { Effect.EXCLUSIVE }); }
private void ShowWeaponSelectMenu() { WeaponSelectMenu weaponSelectMenu = MenuManager.Instance.GetMenuByName(Strings.MenuStrings.WEAPON_SELECT) as WeaponSelectMenu; System.Action onReturnFromPLE = () => { BackAction(); mainPLEMenu.SetUpMenus(); }; System.Action onStartAction = () => { base.ShowStarted(); levelEditor.SetIsTesting(true); base.ShowComplete(); }; weaponSelectMenu.DefineNavigation(null, null, onStartAction, null, onReturnFromPLE); MenuManager.Instance.DoTransition(weaponSelectMenu, Transition.SHOW, new Effect[] { Effect.EXCLUSIVE }); }