Esempio n. 1
0
    public virtual void Fire()
    {
        if (weaponScripts == null)
        {
            return;
        }

        if (weaponScripts.Count == 0)
        {
            return;
        }

        // find the weapon in the currently selected slot
        TEMPWeapon = (BaseWeaponScript)weaponScripts [selectedWeaponSlot];

        theDir = transform.forward;

        if (useForceVectorDirection)
        {
            theDir = forceVector;
        }

        // fire the projectile
        TEMPWeapon.Fire(theDir, ownerNum);
    }
 public virtual void Fire()
 {
     if (weaponScripts == null)
     {
         return;
     }
     if (weaponScripts.Count == 0)
     {
         return;
     }
     TEMPWeapon = (BaseWeaponScript)weaponScripts[selectedWeaponSlot];
     theDir     = myTransfrom.forward;
     if (useForceVectorDirection)
     {
         theDir = forceVector;
     }
     TEMPWeapon.Fire(theDir, ownerNum);
 }
Esempio n. 3
0
    public virtual void Fire()
    {
        if (_weaponsScript == null || _weaponsScript.Count == 0)
        {
            return;
        }

        // Find the weapon in the currently selected slot
        _tmpWeapon = (BaseWeaponScript)_weaponsScript[SelectedWeaponSlot];

        TheDir = iTransform.forward;

        if (UseForceVectorDirection)
        {
            TheDir = ForceVector;
        }

        // fire the projectiles
        _tmpWeapon.Fire(TheDir, _ownerNum);
    }