Example #1
0
 // Update is called once per frame
 void Update()
 {
     if (currentAmmo > 0)
     {
         if (Input.GetButtonDown("Fire1"))
         {
             Instantiate(bullet, gunPoint.position, gunPoint.rotation);
             AudioControl.instance.PlayOneShot(shootSound);
             currentAmmo--;
             scriptUI.AtualizaQtdBalas();
         }
     }
 }