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); }
public void Shoot() { rangeWeapon.Attack(m_RememberedTargetPosition); }