Your project manager likes the possibility to use levels by configuring them using an easy to understand XML file. Now he wants you to find a way to let a player save his own desired skill level. The game must use this skill level. However, he does not want you to use a variable, he wants the values to persist in an isolated storage— without adding security risks for the player.
Now, we are going to add the possibility to save and retrieve configurations values to and from an isolated storage in a sandbox.
1. Stay in the
3DInvadersSilverlight
project.2. Open
InvadersGame.cs
.3. Add the following lines of code at the beginning (as we are going to use the
IsolatedStorageSettings
class):using System.IO.IsolatedStorage;
4. Add the following
private
variable to access the isolated application settings:private IsolatedStorageSettings _appSettings = IsolatedStorageSettings.ApplicationSettings;
5. Add the following
private static
variable to define a string...