Esempio n. 1
0
    public static void EnableNextIconButton()
    {
        if (GameManager.Mode != GameMode.Rehearsal)
        {
            return;
        }

        int[] siteIDs = InteractablePathManager.GetPathSiteIDs();

        // Disable last scene button
        if (activeIndex >= 0)
        {
            int lastSiteID = siteIDs[activeIndex];
            allIconButtons[lastSiteID].GetComponent <Button>().interactable = false;
            allIconButtons[lastSiteID].enableCover.gameObject.SetActive(true);

            Animator prevAnimator = allIconButtons[lastSiteID].GetComponent <Animator>();
            prevAnimator.Play("UIButtonIdle");
        }

        // Enable next scene button
        if (activeIndex + 1 < siteIDs.Length)
        {
            int nextSiteID = siteIDs[activeIndex + 1];
            allIconButtons[nextSiteID].GetComponent <Button>().interactable = true;
            allIconButtons[nextSiteID].enableCover.gameObject.SetActive(false);
            LevelIconButton.ActivateIconForRehersal(nextSiteID, activeIndex + 1);

            Animator nextAnimator = allIconButtons[nextSiteID].GetComponent <Animator>();
            nextAnimator.Play("UIButtonHighlight");
        }
    }
Esempio n. 2
0
 public void SetModeRecoverSeed()
 {
     GameManager.Mode = GameMode.Recall;
     Debug.Log("Setting game mode to recall");
     GoToEncodeSeed();
     LevelIconButton.ResetButtonStatus();
 }
Esempio n. 3
0
    static public void ActivateStart()
    {
        InteractablePathManager.Reset();
        LevelSetManager.ResetCurrentLevels();
        LevelIconButton.ResetButtonIcons();

        Instance.SetBackground(true);
        Instance.GoToStart();
    }
Esempio n. 4
0
    static public void SetIconAndPanelForRehearsal(int[] siteIDs)
    {
        int orderIndex = 0;

        foreach (int siteID in siteIDs)
        {
            LevelIconButton.ActivateIconForRehersal(siteID, orderIndex);
            orderIndex++;
        }
    }
Esempio n. 5
0
    public void GoBack()
    {
        GameManager.Mode = GameMode.Rehearsal;
        isDebug          = false;

        if (state == MenuScreenStates.EncodeSeed)
        {
            LevelIconButton.ResetButtonIcons();
            LevelIconButton.ResetButtonStatus();
        }

        GoToModeSelect();
    }
Esempio n. 6
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--;
        }
    }
Esempio n. 7
0
    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();
        }
    }
Esempio n. 8
0
 static public void SetIconAndPanelForRehearsal(int[] siteIDs)
 {
     LevelIconButton.EnableNextIconButton();
 }
Esempio n. 9
0
 public void UndoLastSceneEncodeStep()
 {
     HideLevelPanel(LevelIconButton.activeIndex);
     LevelIconButton.Undo();
 }