Skip to content

Commit

Permalink
Suppressed task cancellation exception in CameraControllingEntity
Browse files Browse the repository at this point in the history
  • Loading branch information
vchelaru committed Dec 12, 2023
1 parent c2b4993 commit 0d5b0c8
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,16 @@ public async void ShakeScreenUntil(float shakeRadius, Task taskToAwait)
CameraOffset.X = point.X;
CameraOffset.Y = point.Y;

await TimeManager.DelaySeconds(individualShakeDurationInSeconds);
try
{
await TimeManager.DelaySeconds(individualShakeDurationInSeconds);
}
// do nothing, the user cancelled it, so let's just break out...
catch (TaskCanceledException)
{
break;
}

}

CameraOffset.X = 0;
Expand Down

0 comments on commit 0d5b0c8

Please sign in to comment.