Пример #1
0
 public void Grenade()
 {
     ControllerScene.audioClip.Play();
     if (PlayerPrefs.GetInt("Gold") >= 150)
     {
         TestPlayerPref.OnSaveBullet("Grenade", 5);
         TestPlayerPref.OnSave(0, -150, "");
     }
 }
Пример #2
0
 public void BuyShotgun()
 {
     ControllerScene.audioClip.Play();
     if (PlayerPrefs.GetInt("Gold") >= 100)
     {
         TestPlayerPref.OnSaveBullet("Shotgun", 100);
         TestPlayerPref.OnSave(0, -100, "");
     }
 }
Пример #3
0
 public void BuyUMP40()
 {
     ControllerScene.audioClip.Play();
     if (PlayerPrefs.GetInt("Gold") >= 150)
     {
         TestPlayerPref.OnSaveBullet("UMP40", 100);
         TestPlayerPref.OnSave(0, -150, "");
     }
 }
Пример #4
0
    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);
    }