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
+22-22
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
*If you came here from Unity Tutorials, I've not finished the process to move all code to GitHub, so have patience*
4
4
5
-
A collection of programming patterns in Unity, mainly from the book [Game Programming Patterns](http://gameprogrammingpatterns.com). These are very useful to better organize your Unity project as the game grows. You don't have to use them - you should see them as tools in your toolbox. Some patterns, such as Update and Game Loop, are already been built-in into Unity so you have to use them!
5
+
A collection of programming patterns in Unity, mainly from the book [Game Programming Patterns](http://gameprogrammingpatterns.com). These are very useful to better organize your Unity project as the game grows. You don't have to use them - you should see them as tools in your toolbox. Some patterns, such as Update, Game Loop, Component, are already been built-in into Unity so you are already using them!
6
6
7
7
Programming patterns can be divided into the following groups:
8
8
1.**Architectural patterns.** One example is the MVC (Model-View-Controller)
@@ -11,25 +11,25 @@ Programming patterns can be divided into the following groups:
@@ -66,7 +66,7 @@ I've implemented all these in the code, so if you don't understand the differenc
66
66
67
67
**Related patterns**
68
68
69
-
*[Event queue](https://github.com/Habrador/Unity-Programming-Patterns#14-event-queue). The biggest problem with Observer is that it will trigger all methods that subscribe to the event. So if five methods subscribe, then five methods will be triggered. But what if 10 enemies are killed at the same time, then 50 methods will be triggered at the same time, which may freeze your game. This is when you should use the Event queue, which is basically the same as the Observer, but you put the events in a queue and you trigger as many as you can without freezing the game.
69
+
*[Event queue](#14-event-queue). The biggest problem with Observer is that it will trigger all methods that subscribe to the event. So if five methods subscribe, then five methods will be triggered. But what if 10 enemies are killed at the same time, then 50 methods will be triggered at the same time, which may freeze your game. This is when you should use the Event queue, which is basically the same as the Observer, but you put the events in a queue and you trigger as many as you can without freezing the game.
70
70
71
71
72
72
@@ -88,7 +88,7 @@ In your game you have a game object. Now you want to duplicate that object to cr
88
88
89
89
* Factory. The main difference is that in the Factory you can also add stuff to the objects - not just duplicate them. So you can put the Prototype inside of the Factory.
90
90
91
-
*[Object pool](https://github.com/Habrador/Unity-Programming-Patterns#18-object-pool). If you Instantiate and destroy many game objects, it will affect the performance of the game. To solve that problem you can use the Object pool pattern.
91
+
*[Object pool](#18-object-pool). If you Instantiate and destroy many game objects, it will affect the performance of the game. To solve that problem you can use the Object pool pattern.
0 commit comments