예제 #1
0
 public void CallAttack()
 {
     if (Time.time > lastShot + defaultConfig.fireRate)
     {
         if (currentBullet > 0)
         {
             ProcessAttack();
             playerAnim.AttackAnimation();
             lastShot = Time.time;
             currentBullet--;
         }
         else
         {
         }
     }
 }
예제 #2
0
 public void CallAttack()
 {
     if (Time.time > lastShot + defaultConfig.fireRate)
     {
         if (currentAmmo > 0)
         {
             ProcessAttack();
             playerAnim.AttackAnimation();
             lastShot = Time.time;
             currentAmmo--;
         }
         else
         {
             // PLAY NO AMMO SOUND
         }
     }
 }