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"); } }
public void SetModeRecoverSeed() { GameManager.Mode = GameMode.Recall; Debug.Log("Setting game mode to recall"); GoToEncodeSeed(); LevelIconButton.ResetButtonStatus(); }
static public void ActivateStart() { InteractablePathManager.Reset(); LevelSetManager.ResetCurrentLevels(); LevelIconButton.ResetButtonIcons(); Instance.SetBackground(true); Instance.GoToStart(); }
static public void SetIconAndPanelForRehearsal(int[] siteIDs) { int orderIndex = 0; foreach (int siteID in siteIDs) { LevelIconButton.ActivateIconForRehersal(siteID, orderIndex); orderIndex++; } }
public void GoBack() { GameManager.Mode = GameMode.Rehearsal; isDebug = false; if (state == MenuScreenStates.EncodeSeed) { LevelIconButton.ResetButtonIcons(); LevelIconButton.ResetButtonStatus(); } GoToModeSelect(); }
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(); } }
static public void SetIconAndPanelForRehearsal(int[] siteIDs) { LevelIconButton.EnableNextIconButton(); }
public void UndoLastSceneEncodeStep() { HideLevelPanel(LevelIconButton.activeIndex); LevelIconButton.Undo(); }