Summary

This chapter was full of options and details about using the State Machine. We started by creating four States and setting up the StateManager class to be the controller with the help of a C# interface. We learned how to load Scenes when switching States, and keep GameObjects from being destroyed in the process. We also covered using timers and how to pause a Scene.

For such simple code, the State Machine offers a tremendous amount of control and flexibility in organizing your game code. Let's start off the next chapter by using this State Machine to actually control a few GameObjects and change States.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.12.34