Hi,
For this lecture I’m unable to get the multiple audio working, only the thurster sound.
Can you please tell me where I’ve gone wrong? I can’t seem to figure it out Thanks!
private void OnCollisionEnter(Collision collision)
{
// Will prevent the dying console message from appearing more than once
if (state != State.Alive) { return; }
switch (collision.gameObject.tag)
{
case "Friendly":
break;
case "Finish":
state = State.Trancending;
// Load the next scene after 1 second
Invoke("LoadNextLevel", 1f); // parameterize time
break;
default:
state = State.Dying;
audioSource.Stop();
audioSource.PlayOneShot(death);
print("played!");
Invoke("LoadFirstLevel", 1f);
break;
}
}