gamedevexperiments
patreon
Make a 3D RPG like Pokemon in Unity Course #18 - Implementing StateStack
🕑 Added 2023-05-28 18:34:03 +0000 UTCHey everyone, in this video, we'll implement a StateStack (State Machine) that will allow us to handle different states in our game. We'll need the StateStack for implementing the Battle System.
I hope you like the video :)
Comments
GameDev Experiments
Since it's passed to the Enter function, we can just cache it to a private variable and use it through out the state class, no need to pass it to all three functions.
Nour Saidana
I noticed you didn't add "owner" in some of the functions in the statemachine class. Does it make a difference? For example "CurrentState.Execute()" instead of "CurrentState.Execute(owner)" or "Exit()" instead of "Exit(owner)".