Join the Discord: [ Ссылка ]
The state pattern is a commonly used pattern that helps to encapsulate different portions of logic and make the transitions between using the different pieces of logic seamless. This pattern is used in Unity's animation machine's, but it can be used for even more purposes to help make your code more maintainable in the long run. This is based of the state pattern in Bob Nystrom's Game Programming Patterns.
State Pattern: [ Ссылка ]
Example Code: [ Ссылка ]
Animation Machine Example Code: [ Ссылка ]
0:00 Intro
0:30 What is the State Pattern?
6:30 Code Example
---------------------------------------------------------------------
Website: [ Ссылка ]
Github: [ Ссылка ]
Here are some books I recommend if you want to learn about game engine development more thoroughly. I do not profit off any of these sales, these are just some books that have helped me out :)
My Recommended Game Engine Books:
Game Engine Architecture: [ Ссылка ]
Game Physics Cookbook (Read this before the next physics book): [ Ссылка ]
Game Physics (Ian Millington): [ Ссылка ]
Game Programming Patterns (Free): [ Ссылка ]
My Recommended Beginning Game Programming Books:
JavaScript Game Design: [ Ссылка ]
My Recommended Java Books:
Data Structures/Algorithms: [ Ссылка ]
LWJGL (Free, but I haven't read this thoroughly): [ Ссылка ]
Outro Music: [ Ссылка ]
Ещё видео!