public void Shoot()
        {
            throwAudioPlayer.PlayRandomClip();

            Vector3 toTarget = m_GrenadeTarget - transform.position;

            //the grenade is launched a couple of meters in "front" of the player, because it bounce and roll, to make it a bit ahrder for the player
            //to avoid it
            Vector3 target = transform.position + (toTarget - toTarget * 0.3f);

            grenadeLauncher.Attack(target);
        }
Exemple #2
0
 public void Shoot()
 {
     rangeWeapon.Attack(m_RememberedTargetPosition);
 }