Пример #1
0
    IEnumerator Reload()
    {
        uISingleton.setBullets("reloading");
        yield return(new WaitForSeconds(2));

        bulletsInMagazine = 10;
        magazines--;
        uISingleton.setBullets(bulletsInMagazine.ToString());
        uISingleton.setMagazines(magazines.ToString());
        canFire = true;
    }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     uISingleton = UISingleton.Instance;
     uISingleton.setBullets(bulletsInMagazine.ToString());
     uISingleton.setMagazines(magazines.ToString());
 }
Пример #3
0
 private void OnCollsionWithAmmo(Collision collision)
 {
     uISingleton.setMagazines(pistol.AddMagazine().ToString());
     Destroy(collision.gameObject);
 }