Note the highlighted statements, which were added to use the using Tombstoning and Isolated storage capabilities.
Locate the "Fields" region and add the following field:
string fileName = "Catapult.dat";
This field stores the name of the game state file. Later, we will see how to create this file in the Isolated Storage.
Replace the class constructor with the following code:
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
// Frame rate is 30 fps by default for Windows Phone.
TargetElapsedTime = TimeSpan.FromTicks(333333);
//Create a new instance of the Screen Manager
screenManager = new ScreenManager(this);
//Switch to full screen for best game experience
graphics.IsFullScreen = true;
//Add two new screens
screenManager.AddScreen(new BackgroundScreen(), null);
mainMenuScreen = new MainMenuScreen();
Locate the "Initialization Methods" region and add there the following code:
private void InitializaPhoneServices()
Page | 91