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
+10-3Lines changed: 10 additions & 3 deletions
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/contents.html). 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 and Game Loop, are already been built-in into Unity so you have to use 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)
@@ -33,6 +33,9 @@ Patterns from the book Game Programming Patterns:
33
33
34
34
Other patterns:
35
35
36
+
-
37
+
38
+
# Patterns from the book Game Programming Patterns
36
39
37
40
## 1. Command
38
41
@@ -51,7 +54,7 @@ This pattern is so popular that C# has implemented it for you. Unity also has it
51
54
* EventHandler
52
55
* Action
53
56
* UnityEvent
54
-
* Your own implementation
57
+
* Your own implementation by using a delegate
55
58
56
59
I've implemented all these in the code, so if you don't understand the difference take a look there.
57
60
@@ -106,7 +109,7 @@ Your game can be in a number of states. For example, the main character can have
106
109
107
110
* When you have too many nested if-statements, such as in a menu system. In the code, you can see an example of a menu system that uses this pattern.
108
111
* Unity is using this pattern in the animation engine.
109
-
* When making a turn-based combat system: [How to Code a Simple State Machine](https://www.youtube.com/watch?v=G1bd75R10m4).
112
+
* When you make a turn-based combat system: [How to Code a Simple State Machine](https://www.youtube.com/watch?v=G1bd75R10m4).
110
113
111
114
112
115
@@ -148,3 +151,7 @@ Your game can be in a number of states. For example, the main character can have
0 commit comments