public void StartGame() { if (PlayerPrefs.GetInt("battery", 5) < 0) { Debug.Log("You need to charge your battery."); return; } UITopBar.SetActive(true); UICalculator.SetActive(true); ResetValuesToDefault(); ResetDisplayValues(); BuildsNormal.ForEach(x => x.SetActive(true)); BuildsDestroyed.ForEach(x => x.SetActive(false)); isPlaying = true; gameCamera.GetComponent <Animator>().SetTrigger("GoToBuild_01"); }
public void StopGame() { UITopBar.SetActive(false); UICalculator.SetActive(false); isPlaying = false; }