public override void OnEnterState(AudioEvent audioEvent) { //todo do some initialize work base.OnEnterState(audioEvent); AudioEvent.Loaded = false; AudioEvent.EnterState("ToPlay"); }
public override void OnStateUpdate() { AudioEvent.ApplyChannelParameters(); if (!AudioEvent.AudioSource.isPlaying) { AudioEvent.EnterState("Stopping"); } if (AudioEvent.ShouldBeVirtual()) { AudioEvent.EnterState("Virtualizing"); } }
public override void OnStateUpdate() { base.OnStateUpdate(); if (!AudioEvent.ShouldBeVirtual()) { AudioEvent.EnterState("ToPlay"); } if (!AudioEvent.AudioSource.isPlaying) { AudioEvent.EnterState("Stopping"); } }
public override void OnEnterState(AudioEvent audioEvent) { base.OnEnterState(audioEvent); if (AudioEvent.ShouldBeVirtual()) { if (AudioEvent.OnShot) { AudioEvent.EnterState("Stopping"); } else { AudioEvent.EnterState("Virtual"); } return; } if (!AudioEvent.Loaded) { AudioEvent.EnterState("Load"); return; } AudioEvent.EnterState("Playing"); }