Controlling the game with a State Machine
Just like your daily routines, you follow certain patterns that are comfortable to you. Why is that? Probably because it's easy for you and they're etched in your brain; they're habits.
Whatever it is you do; sort your laundry, build a sandwich, wash the dishes, work with Unity, you will eventually develop a routine pattern that you'll follow and like. You can equally believe that you will establish a pattern for writing scripts, too. Right now, after reading this book, you may already have some idea of how you will write and add scripts to GameObjects. Maybe you're already quite proficient at everything in Unity except for the scripting part. All you may want is to write some scripts and attach them to your GameObjects, then get back to doing the fun stuff.
How you design your scripts to control your game can be simple and neat, or if you're not careful, it could turn into a spaghetti nightmare that will make you pull...