Exemple #1
0
 public void PlayerFire(Ammo currentAmmo)
 {
     foreach (Transform weaponFireSpawPoint in player.findChildByTag(PlayerGlobalStatus.getCurrentWeaponUpgradeTag()))
     {
         try{
             if (IsValidAmmoFireSpawnPoint(currentAmmo, weaponFireSpawPoint))
             {
                 if (PlayerGlobalStatus.isAmmoDiretionalFire(currentAmmo))
                 {
                     diretionalFire(currentAmmo, weaponFireSpawPoint);
                 }
                 else if (PlayerGlobalStatus.isAmmoTrackerFire(currentAmmo))
                 {
                     fireDirectionalTracker(currentAmmo, weaponFireSpawPoint);//diretionalFire(currentAmmo, WeaponFireSpawPoint);
                 }
                 else
                 {
                     linearFire(currentAmmo, weaponFireSpawPoint);
                 }
             }
         }catch (System.Exception e) {
             Debug.LogWarning(e);
         }
     }
 }