public void _Hide(bool hidePerkButton = true) { if (UI.PauseGameInPerkMenu()) { Time.timeScale = 1; UIHUD.NormalTime(); } isOn = false; menuObj.SetActive(isOn); if (hidePerkButton) { perkButtonObj.SetActive(isOn); } }
public void _Show(bool showPerkMenu = false) { UpdatePerkPoint(PerkManager.GetPerkPoint()); UpdatePerkItem(); if (showPerkMenu) { if (UI.PauseGameInPerkMenu()) { Time.timeScale = 0; UIHUD.NormalTime(); } isOn = true; menuObj.SetActive(isOn); } perkButtonObj.SetActive(true); }
// Use this for initialization void Start() { instance = this; buttonSpawn.Init(); txtTimer.text = ""; scoreObj.SetActive(false); List <Rsc> rscList = ResourceManager.GetResourceList(); for (int i = 0; i < rscList.Count; i++) { if (i == 0) { rscObjList[i].Init(); } else { rscObjList.Add(rscObjList[0].Clone("RscObj" + i, new Vector3(i * 90, 0, 0))); } rscObjList[i].imageIcon.sprite = rscList[i].icon; } OnLife(0); OnNewWave(1); OnResourceChanged(new List <int>()); if (SpawnManager.AutoStart()) { buttonSpawn.rootObj.SetActive(false); //StartCoroutine(AutoStartTimer()); OnSpawnTimer(SpawnManager.GetAutoStartDelay()); } }