Exemplo n.º 1
0
 /// <summary>
 /// Spawn the bullet when left mouse button is down
 /// </summary>
 private void CheckShoot()
 {
     if (Input.GetMouseButton(0))
     {
         if (_reloading <= 0)
         {
             _currentBullet = BulletPool.Instance.GetObjectFromPool();
             if (_currentBullet != null)
             {
                 _bulletBase.EnableObject(_currentBullet);
                 _reloading = ReloadTime;
             }
         }
     }
 }