Chapter 7. Creating the Gameplay is Just a Part of the Game
Gameplay is usually the main thing everyone thinks of when first undertaking the creation of a game. Build a scene, fill it with GameObjects, and write the scripts. After the game is well along in its development, a realization begins to appear that there's more to a game than just playing it. Putting a game on the market means it has to include things such as beginning title screen, the game options, or a player settings menu. Also, what happens when the user wins the game, or loses the game? It's one thing to write the code for GameObjects, but what about the code to add on all the other parts that come before and after the actual playing of the game?
In this chapter, we'll begin work on a C# State Machine, one possible solution for providing the necessary base code to easily incorporate the non-playing parts of a game.
In this chapter we will discuss the following topics:
- How a State Machine helps in...