public void CloseStore() { selectedObject = null; previousObject = null; loadManager.ChangeLevel(0); gameObject.GetComponent<DefensesStore>().enabled = false; }
private void WinAnimEnd() { isRotationStarted = false; isAnimPlaying = false; winMenu.gameObject.SetActive(false); mainMenu.gameObject.SetActive(true); this.transform.position = originalTrophyPosition; this.transform.rotation = originalTrophyRotation; if (winPointCounter.winPoints >= winPointCounter.purchaseUnlockCost && winPointCounter.winPoints < winPointCounter.purchaseUnlockMax) { winPointCounter.purchaseUnlockCost += winPointCounter.purchaseUnlockScaler; loadManager.ChangeLevel(-4); } else { loadManager.ChangeLevel(0); } }
public void Xbutton() { if (printingMenu.isActiveAndEnabled == true) //todo add win and lose menu navigations { previousMenu = printingMenu; loadManager.QuitLevel(); } else if (loadingMenu.isActiveAndEnabled == true) { return; } else if (quitMenu.isActiveAndEnabled == true) { loadManager.LoseLevel(); quitMenu.gameObject.SetActive(false); } else if (loseMenu.isActiveAndEnabled == true) { mainMenu.gameObject.SetActive(true); loseMenu.gameObject.SetActive(false); } else if (winMenu.isActiveAndEnabled == true) { winMenu.gameObject.SetActive(false); mainMenu.gameObject.SetActive(true); loadManager.ChangeLevel(0); } else { foreach (Canvas canvas in allNonPrintMenus) { canvas.gameObject.SetActive(false); } foreach (GameObject colorObject in printColorObjects) { colorObject.SetActive(false); } mainMenu.gameObject.SetActive(true); } }