Esempio n. 1
0
 public static void GameOver()
 {
     Time.timeScale = 0;
     Player.Money  += earnedMoney;
     _gameOverPanel.SetActive(true);
     ButtonUpgrade.ChangeButtons(FindObjectOfType <Form>());
 }
Esempio n. 2
0
    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>());
    }
Esempio n. 3
0
 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();
     }
 }
Esempio n. 4
0
 public void OpenShop()
 {
     ShopPanel.SetActive(!ShopPanel.activeSelf);
     LevelsPanel.SetActive(!ShopPanel.activeSelf);
     ButtonUpgrade.ChangeButtons(FindObjectOfType <Form>());
 }