public void exitToMenu() { SeedQuest.Level.LevelManager.Instance.StopLevelMusic(); MenuScreenManager.ActivateStart(); gameObject.SetActive(false); GameManager.GraduatedMode = false; }
public void ResetPlaythrough() { InteractablePathManager.Reset(); MenuScreenManager.ActivateSceneLineUp(); gameObject.SetActive(false); GameManager.GraduatedMode = true; }
void Start() { menuScreenManager = GetComponentInParent <MenuScreenManager>(); characterGrid = new GridCollection <GameCharacter>(characterSet.characters, Columns); foreach (var existingPlayer in GameManager.Instance.players) { var playerSelection = new PlayerSelection(existingPlayer, existingPlayer.character, false); playerSelections.Add(playerSelection); } playerSelections.ObserveAdd() .Select(ev => ev.Value) .SelectMany(playerSelection => { var playerRemoved = playerSelections.ObserveRemove().Where(ev => ev.Value == playerSelection); return(playerSelection.confirmed.TakeUntil(playerRemoved).Select(_ => Unit.Default)); }) .Merge(playerSelections.ObserveRemove().Select(_ => Unit.Default)) .Select(_ => AllPlayersReady()) .Subscribe(allReady => { if (allReady) { confirmPrompt.Show(); } else { confirmPrompt.Hide(); } }) .AddTo(this); }
static public void Undo() { activeButtons[activeIndex].DeactivateIcon(); if (GameManager.Mode == GameMode.Recall && activeIndex < 0) { MenuScreenManager.DisableUndoButton(); } }
public void onClickButton() { ActivateNumberIcon(this, iconIndex, true, MenuScreenManager.Instance.isDebug); EnableNextIconButton(); if (GameManager.Mode == GameMode.Recall) { MenuScreenManager.EnableUndoButton(); } }
public void Initialize() { if (!_initialized) { _initialized = true; Instance = this; menuScreens = FindObjectsOfType <MenuScreen>().ToList(); menuScreens.ForEach((screen => screen.gameObject.SetActive(false))); SetScreen(startScreen); } }
private void TopPalette_OnLoad() { var path = "C://Users/petrs/Desktop/oldLevel"; if (FileSystem.Current.LocalStorage.CheckExistsAsync(path).Result == ExistenceCheckResult.NotFound) { // TODO: Show a message that the file is not there return; } MenuScreenManager.GetScreen <ScreenLevelCreator>().LoadMap(FileSystem.Current.LocalStorage.GetFileAsync(path).Result.ReadAllTextAsync().Result); }
public void GoToStartScreen() { SeedQuest.Level.LevelManager.Instance.StopLevelMusic(); if (GameManager.V2Menus) { MenuScreenV2.Instance.GoToStart(); } else { MenuScreenManager.ActivateStart(); } gameObject.SetActive(false); GameManager.GraduatedMode = false; }
private void OnHoverExit() { if (GameManager.Mode == GameMode.Recall) { animator.Play("UIButtonIdle"); } MenuScreenManager.HideLevelPanel(activeIndex + 1); if (GetComponent <Button>().interactable == false) { return; } }
public void ExitToMainMenu() { SeedQuest.Level.LevelManager.Instance.StopLevelMusic(); InteractablePathManager.Reset(); if (GameManager.V2Menus) { MenuScreenV2.Instance.GoToStart(); } else { MenuScreenManager.ActivateStart(); } //gameObject.SetActive(false); animator.Play("SlideDown"); GameManager.GraduatedMode = false; }
void Start() { menuScreenManager = GetComponentInParent <MenuScreenManager>(); trackGrid = new GridCollection <Track>(trackList.tracks, Columns); selectedTrack.Value = trackGrid.First(); selectionConfirmed.Subscribe(confirmed => { if (confirmed) { confirmPrompt.Show(); TrackManager.Instance.track = selectedTrack.Value; } else { TrackManager.Instance.track = null; confirmPrompt.Hide(); } }); }
public static void ActivateNumberIcon(LevelIconButton iconButton, int iconIndex, bool isActive) { if (activeIndex >= activeButtons.Length) { return; } if (isActive) { activeIndex++; activeButtons[activeIndex] = iconButton; iconButton.numberIcons[activeIndex].gameObject.SetActive(true); iconButton.border.color = iconButton.numberIcons[activeIndex].color; MenuScreenManager.SetLevelPanel(activeIndex, iconIndex); } else { iconButton.numberIcons[activeIndex].gameObject.SetActive(false); activeIndex--; } }
public static void ActivateNumberIcon(LevelIconButton iconButton, int iconIndex, bool isActive, bool debug) { if (activeIndex >= activeButtons.Length) { return; } if (isActive) { activeIndex++; string sound = "UI_SceneSelect" + (activeIndex + 1); AudioManager.Play(sound); activeButtons[activeIndex] = iconButton; iconButton.numberIcons[activeIndex].gameObject.SetActive(true); iconButton.border.color = iconButton.numberIcons[activeIndex].color; LevelSetManager.AddLevel(iconIndex); MenuScreenManager.SetLevelPanel(activeIndex, iconIndex); if (activeIndex == InteractableConfig.SitesPerGame - 1 && debug == false) { MenuScreenManager.SetEncodeSeedContinueCanvas(); } else if (activeIndex == InteractableConfig.SitesPerGame - 1) { MenuScreenManager.SetEncodeSeedDebugCanvas(); } } else { iconButton.border.color = new Color(0, 0, 0, 0); iconButton.numberIcons[activeIndex].gameObject.SetActive(false); activeIndex--; LevelSetManager.RemoveLevel(); } }
public void GoToStartScreen() { MenuScreenManager.ActivateStart(); gameObject.SetActive(false); }
private void TopPalette_OnGroup() { MenuScreenManager.GetScreen <ScreenLevelCreator>().CreateGroup(); }
private string SerializeMap() { return(MenuScreenManager.GetScreen <ScreenLevelCreator>().SerializeMap()); }
private void Awake() { Instance = this; }
private void OnOnClick(MyTouch myTouch) { MenuScreenManager.GetScreen <ScreenLevelCreator>().CreatePixelRectangle(); }
static private MenuScreenManager setInstance() { instance = GameObject.FindObjectOfType <MenuScreenManager>(); return(instance); }
public void Awake() { _menuScreenManager = GameObject.FindGameObjectWithTag("Root").GetComponent <MenuScreenManager>(); }
public override void Show(IMenuScreenElement enabler) { base.Show(enabler); MenuScreenManager.GetScreen <ScreenPalettes>().Show(); }
public void GoToSceneSelect() { //LevelManager.GoToSceneSelect(); MenuScreenManager.ActivateSceneLineUp(); gameObject.SetActive(false); }
public static Vector2 GetLeftTopIndexPosition(Vector2 basicPosition, Vector2 basicSize) { return(PixelMath.GameToPixelPosition(basicPosition - basicSize / 2f + PixelOptions.PixelSize / 2, MenuScreenManager.GetScreen <ScreenLevelCreator>().MapSize)); }
private void TopPalette_OnRemove() { MenuScreenManager.GetScreen <ScreenLevelCreator>().RemoveSelection(); }
private void Awake() { _menuScreenManager = FindObjectOfType <MenuScreenManager>(); }