Now that our game is rendering balloons to a screen, why don't we go ahead and add a …menu to our game. …This will enable us to pause gameplay and let us switch between both game modes and menu modes. …We are going to start off by clicking into default.js, and we are going to add some variables …for the menu. …So right after the animation handler, we're going to put in two new variables: the background …for the menu and the MENUNUM.…
MENUNUM will be used for a function that will give us a random background. …We are also going to have a variable that will keep track of whether the user has enabled …the menu or not. …Let's add this image right now before we forget. …We are going to images > Add > Existing Item, go to my Desktop > Exercise Files > Chapter …04, and there is background_1. …Now we need to add the div for the menu. …We're going to do that inside of default.html, and we are going to add it right here before the canvas.…
So a standard div tag, I am calling divMenu and inside of that div, I've got two images: …
- Setting up your Visual Studio 2012 development environment
- Laying out the interface with Canvas
- Creating a game loop
- Adding a menu
- Supporting snapped, filled, and full-screen modes
- Working with the Touch API
- Playing music
- Creating a scoring and leveling system
- Working with the Application Bar
- Accessing the camera and accelerometer
- Debugging and deploying your application
Skill Level Intermediate
Visual Studio 2010 Essential Trainingwith Walt Ritscher8h 8m Intermediate
1. Getting Started
2. The Microsoft Web Platform
3. The Game Interface
4. The Game Engine
5. Screen Size Support
6. Touch Support
7. Music and Sound
8. Gaming Extras
9. Windows Features
10. Device Hardware
Using the accelerometer6m 59s
Next steps1m 29s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.