crashy fix
This commit is contained in:
@@ -151,6 +151,7 @@ namespace Game
|
||||
await Task.Delay((int)(randomDelay * 1000f));
|
||||
//FlaxEngine.Scripting.RunOnUpdate(() =>
|
||||
// PlaySound(soundName, actor, channel, flags, position, volume, pitchRange));
|
||||
if (actor) // Engine might have cleaned up the actor
|
||||
PlaySound(soundName, actor, channel, AudioFlags.None, position, volume, Vector2.One);
|
||||
}
|
||||
|
||||
@@ -166,6 +167,7 @@ namespace Game
|
||||
await Task.Delay((int)(randomDelay * 1000f));
|
||||
//FlaxEngine.Scripting.RunOnUpdate(() =>
|
||||
// PlaySound(soundName, actor, channel, flags, position, volume, pitchRange));
|
||||
if (actor) // Engine might have cleaned up the actor
|
||||
PlaySound(soundName, actor, channel, AudioFlags.None, position, volume, pitchRange);
|
||||
}
|
||||
|
||||
@@ -180,6 +182,7 @@ namespace Game
|
||||
await Task.Delay((int)(randomDelay * 1000f));
|
||||
//FlaxEngine.Scripting.RunOnUpdate(() =>
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user