Home Artists Posts Import Register

Downloads

Content

Hey 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 :)

Files

Comments

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)".

gamedevexperiments

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.