void shootBullet() { Vector3 newBulletLocation = this.transform.position; BulletMovement newBullet = bullet.GetPooledInstance <BulletMovement>(newBulletLocation); Vector3 offset = newBullet.direction * 0.8f; newBullet.transform.Translate(offset); float vol = Random.Range(0.8f, 1.0f); source.pitch = (Random.Range(0.8f, 1.2f)); source.PlayOneShot(shootSound, vol); }