public static void GameOver() { Time.timeScale = 0; Player.Money += earnedMoney; _gameOverPanel.SetActive(true); ButtonUpgrade.ChangeButtons(FindObjectOfType <Form>()); }
public static void Finish() { var j = FindObjectsOfType <JoyStick>(); j[0].Disable(); j[1].enabled = false; Time.timeScale = 0; Player.Money += earnedMoney; _finishPanel.SetActive(true); ButtonUpgrade.ChangeButtons(FindObjectOfType <Form>()); }
public void Start() { FirstTime = PlayerPrefs.GetInt("firsttime"); if (FirstTime != 0) { Player.Money = PlayerPrefs.GetInt("money"); Hero.MaxHp = PlayerPrefs.GetInt("maxhp"); Hero.Damage = PlayerPrefs.GetInt("damage"); Hero.Speed = PlayerPrefs.GetFloat("speed"); Hero.FireRate = PlayerPrefs.GetFloat("firerate"); Hero.JumpForce = PlayerPrefs.GetFloat("jumpforce"); ButtonUpgrade.ChangeButtons(FindObjectOfType <Form>()); } else { FirstTime = 1; Save(); } }
public void OpenShop() { ShopPanel.SetActive(!ShopPanel.activeSelf); LevelsPanel.SetActive(!ShopPanel.activeSelf); ButtonUpgrade.ChangeButtons(FindObjectOfType <Form>()); }