public InstructionScreen(PlayerIndexEventArgs e, GameToPlay gameToPlay) : base("") { _gameToPlay = gameToPlay; _marginLeft = 110; _e = e; }
/// <summary> /// Constructor. /// </summary> public GameplayScreen(GameToPlay action) { TransitionOnTime = TimeSpan.FromSeconds(1.5); TransitionOffTime = TimeSpan.FromSeconds(0.5); EasyStorageSettings.SetSupportedLanguages(Language.English); _saveDevice = new IsolatedStorageSaveDevice(); SaveGameGlobal.SaveDevice = _saveDevice; _saveDevice.SaveCompleted += SaveDeviceSaveCompleted; //This will be used for drag and drop operations EnabledGestures = GestureType.FreeDrag | GestureType.DragComplete | GestureType.Tap; CurrentGameToPlay = action; if (action == GameToPlay.NewGame) { Player.currentLevel = 1; } else if (action == GameToPlay.SurvivalGame) { Player.currentLevel = 0; } else { if (Player.currentLevel > 1) _doLoad = true; else _doLoad = false; } }