Home » 2012»April»8 » Digital - Tutors - Unity Mobile Game Development: Game State
10:03
Digital - Tutors - Unity Mobile Game Development: Game State
Digital - Tutors - Unity Mobile Game Development: Game State | 1.09 GB 1 hrs. 57 min. | February 1, 2012 | Unity 3.4 | Author: Chris Glick
In this Unity tutorial, we’ll learn how to code a game's state or logic to keep track of things like timers, kills and rounds. Through these lessons, we’ll examine our game design doc and build game-play functionality. We'll begin with creating a simple count-down timer and how to let other scripts cleanly access it. Then we'll learn how to start and end our game with a splash screen to hide the level. Next we'll create functions for the various parts of a game, like winning a round, pausing the game, killing an enemy, saving our data, resetting our game, and game over. Finally we'll take a quick look at randomly spawning our player. A game's internal logic is one of the most important parts of any game's development. By learning how to deal with many common game states, we can extend them to fit our own game's needs.
1. Introduction and project overview 2. Examining our start scene and the scripts that are included 3. Consulting our game design document to begin our script 4. Coding our Timer and counting down in the Update function 5. Using Get functions to let other scripts access our variables 6. Connecting our Render Overlay script component 7. Adding Update logic to turn the overlay on and off 8. Beginning the Won Round function 9. Using Yield to pause our script execution for a second 10. Listening for pausing and adding pause functionality 11. Coding our EnemyKilled function with data checking 12. Creating a function to save all of our stats after a round 13. Coding a GameOver function to load another level 14. Creating a reset function to start at round one 15. Moving the player to a random location 16. Randomly placing the player in the level based on waypoints 17. Cleaning up the WonRound and adding a random spawn toggle