You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -344,8 +344,6 @@ This pattern is almost the same as the [Observer](#3-observer) pattern. The only
344
344
345
345
Combine the [Command](#1-command) pattern with a C#'s built-in queue, which is why this pattern is sometimes known as a **Command Queue**. In the Update method you pick the first Command in the queue and run it while measuring time. To measure time you can use System.Diagnostics.Stopwatch. If you have time to spare, you run the next Command, and so on until you are out of time. How much time you can spend on the Event Queue each update depends on the game, so you have to experiment.
346
346
347
-
Credit to [masoudarvishian](https://github.com/masoudarvishian) for implementing this pattern!
348
-
349
347
**When is it useful?**
350
348
351
349
* When you after an event will load an asset. This may take time, so if you want to play a sound when clicking a button, the game may freeze because it has to load the sound. A better way is to play the sound some frames after the click.
@@ -557,6 +555,13 @@ Define a template method in the parent class which consists of calling several m
557
555
558
556
559
557
558
+
# Credits
559
+
560
+
*[masoudarvishian](https://github.com/masoudarvishian) for implementing Event Queue pattern, Service Locator pattern, and bug fixing
561
+
*[VladimirMirMir](https://github.com/VladimirMirMir) for bug fixing
0 commit comments