public void Update() { if (Input.GetKeyDown(KeyCode.Space)) { PlayerCamera.CastWaveOnAll(new Vector3(Random.Range(-10f, 10f), 0, Random.Range(-10f, 10f)), 5f, 10f, Color.white, Color.red, Color.red); } }
public void PlayEnemySound(Vector3 pos, AudioClip clip, float range) { if (clip != null) { TemporaryAudioSource.PlayTempClip(clip, pos); } PlayerCamera.CastWaveOnAll(pos, 15f, range, Color.yellow, Color.red, Color.red); }
public void PlayHearableSound(Vector3 pos, AudioClip clip, float range) { if (clip != null) { TemporaryAudioSource.PlayTempClip(clip, pos); } PlayerCamera.CastWaveOnAll(pos, 10f, range, Color.cyan, Color.blue, Color.magenta); if (Vector3.Distance(pos, jason.transform.position) < range) { jason.SetDestination(pos); } }