Exemple #1
0
 public void exitToMenu()
 {
     SeedQuest.Level.LevelManager.Instance.StopLevelMusic();
     MenuScreenManager.ActivateStart();
     gameObject.SetActive(false);
     GameManager.GraduatedMode = false;
 }
Exemple #2
0
 public void ResetPlaythrough()
 {
     InteractablePathManager.Reset();
     MenuScreenManager.ActivateSceneLineUp();
     gameObject.SetActive(false);
     GameManager.GraduatedMode = true;
 }
Exemple #3
0
    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);
     }
 }
Exemple #7
0
        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);
        }
Exemple #8
0
 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;
        }
    }
Exemple #10
0
 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;
 }
Exemple #11
0
    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();
            }
        });
    }
Exemple #12
0
    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();
        }
    }
Exemple #14
0
 public void GoToStartScreen()
 {
     MenuScreenManager.ActivateStart();
     gameObject.SetActive(false);
 }
Exemple #15
0
 private void TopPalette_OnGroup()
 {
     MenuScreenManager.GetScreen <ScreenLevelCreator>().CreateGroup();
 }
Exemple #16
0
 private string SerializeMap()
 {
     return(MenuScreenManager.GetScreen <ScreenLevelCreator>().SerializeMap());
 }
 private void Awake()
 {
     Instance = this;
 }
Exemple #18
0
 private void OnOnClick(MyTouch myTouch)
 {
     MenuScreenManager.GetScreen <ScreenLevelCreator>().CreatePixelRectangle();
 }
Exemple #19
0
 static private MenuScreenManager setInstance()
 {
     instance = GameObject.FindObjectOfType <MenuScreenManager>(); return(instance);
 }
Exemple #20
0
 public void Awake()
 {
     _menuScreenManager = GameObject.FindGameObjectWithTag("Root").GetComponent <MenuScreenManager>();
 }
Exemple #21
0
        public override void Show(IMenuScreenElement enabler)
        {
            base.Show(enabler);

            MenuScreenManager.GetScreen <ScreenPalettes>().Show();
        }
Exemple #22
0
 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));
 }
Exemple #24
0
 private void TopPalette_OnRemove()
 {
     MenuScreenManager.GetScreen <ScreenLevelCreator>().RemoveSelection();
 }
Exemple #25
0
 private void Awake()
 {
     _menuScreenManager = FindObjectOfType <MenuScreenManager>();
 }