public void Grenade() { ControllerScene.audioClip.Play(); if (PlayerPrefs.GetInt("Gold") >= 150) { TestPlayerPref.OnSaveBullet("Grenade", 5); TestPlayerPref.OnSave(0, -150, ""); } }
public void BuyShotgun() { ControllerScene.audioClip.Play(); if (PlayerPrefs.GetInt("Gold") >= 100) { TestPlayerPref.OnSaveBullet("Shotgun", 100); TestPlayerPref.OnSave(0, -100, ""); } }
public void BuyUMP40() { ControllerScene.audioClip.Play(); if (PlayerPrefs.GetInt("Gold") >= 150) { TestPlayerPref.OnSaveBullet("UMP40", 100); TestPlayerPref.OnSave(0, -150, ""); } }
void EndGame(bool KQ) { CanvasEndGame.SetActive(true); if (KQ) { EndGameText.text = "You Win"; } else { EndGameText.text = "You Lose"; } EndGameScore.text = "You Score: " + Score.ToString(); Time.timeScale = 0; CanvasGame.SetActive(false); TestPlayerPref.OnSave(Score, Score, System.DateTime.Now.ToString()); TestPlayerPref.OnSaveBullet("Shotgun", 0); TestPlayerPref.OnSaveBullet("UMP40", 0); TestPlayerPref.OnSaveBullet("Grenade", 0); }