public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; // Frame rate is 30 fps by default for Windows Phone. TargetElapsedTime = TimeSpan.FromTicks(333333); // Extend battery life under lock. InactiveSleepTime = TimeSpan.FromSeconds(1); player = new Player(this); enemyHandler = new EnemyHandler(this); try { highScore = (int)IsolatedStorageSettings.ApplicationSettings["HighScore"]; } catch { IsolatedStorageSettings.ApplicationSettings.Add("HighScore", highScore); } try { username = (string)IsolatedStorageSettings.ApplicationSettings["Username"]; } catch { IsolatedStorageSettings.ApplicationSettings.Add("Username", username); } Mogade = MogadeHelper.CreateInstance(); Mogade.LogApplicationStart(); }
public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; player = new Player(this); enemyHandler = new EnemyHandler(this); graphics.PreparingDeviceSettings += new EventHandler<PreparingDeviceSettingsEventArgs>( graphics_PreparingDeviceSettings); }