crashy fix
This commit is contained in:
@@ -151,7 +151,8 @@ namespace Game
|
||||
await Task.Delay((int)(randomDelay * 1000f));
|
||||
//FlaxEngine.Scripting.RunOnUpdate(() =>
|
||||
// PlaySound(soundName, actor, channel, flags, position, volume, pitchRange));
|
||||
PlaySound(soundName, actor, channel, AudioFlags.None, position, volume, Vector2.One);
|
||||
if (actor) // Engine might have cleaned up the actor
|
||||
PlaySound(soundName, actor, channel, AudioFlags.None, position, volume, Vector2.One);
|
||||
}
|
||||
|
||||
public static async void PlaySoundDelayed(Vector2 delayRange, string soundName, Actor actor, int channel, Vector3 position, float volume, Vector2 pitchRange)
|
||||
@@ -166,7 +167,8 @@ namespace Game
|
||||
await Task.Delay((int)(randomDelay * 1000f));
|
||||
//FlaxEngine.Scripting.RunOnUpdate(() =>
|
||||
// PlaySound(soundName, actor, channel, flags, position, volume, pitchRange));
|
||||
PlaySound(soundName, actor, channel, AudioFlags.None, position, volume, pitchRange);
|
||||
if (actor) // Engine might have cleaned up the actor
|
||||
PlaySound(soundName, actor, channel, AudioFlags.None, position, volume, pitchRange);
|
||||
}
|
||||
|
||||
public static async void PlaySoundDelayed(Vector2 delayRange, string soundName, Actor actor, int channel, AudioFlags flags, Vector3 position, float volume, Vector2 pitchRange)
|
||||
@@ -180,7 +182,8 @@ namespace Game
|
||||
await Task.Delay((int)(randomDelay * 1000f));
|
||||
//FlaxEngine.Scripting.RunOnUpdate(() =>
|
||||
// PlaySound(soundName, actor, channel, flags, position, volume, pitchRange));
|
||||
PlaySound(soundName, actor, channel, flags, position, volume, pitchRange);
|
||||
if (actor) // Engine might have cleaned up the actor
|
||||
PlaySound(soundName, actor, channel, flags, position, volume, pitchRange);
|
||||
}
|
||||
|
||||
public static void StopSound(Actor actor, int channel)
|
||||
|
||||
Reference in New Issue
Block a user