/// <summary> /// Constructor of the <c>LoadingGame</c> class. /// </summary> /// <param name="mapName">Name of the map to be loaded.</param> /// <param name="create">true if the resources should be loaded, false otherwise.</param> /// <param name="savedGame">Saved game that should be loaded.</param> public LoadingGame(string mapName, bool create = true, SavedGame savedGame = null) { GameGraphicsDevice = EngineManager.GameGraphicsDevice; _create = create; _savedGame = savedGame; _mapName = mapName; _mapInformation = FileHelper.readMapInformation(mapName); _resources = new List <string>(_mapInformation["Elements"].Split(' ')); _resources.Add("Map_1_1.txt"); _resources.Add("Map_1_2.txt"); _resources.Add("Map_1_3.txt"); _resources.Add("Map_1_4.txt"); _resources.Add("Map_1_5.txt"); _loadedResources = new List <string>(); _safeTime = 0; _numberOfLoadedResources = 0; _totalResources = _resources.Count; }
/// <summary> /// Constructor of the <c>MainGameScreen</c> class. /// </summary> /// <param name="name">Name of the screen.</param> /// <param name="mapName">Name of the represented map.</param> /// <param name="mapInformation">Information of the level and the enemies.</param> /// <param name="savedGame">Saved game that contains the current state of the player.</param> public MainGameScreen(string name, string mapName, Dictionary <string, string> mapInformation, SavedGame savedGame) : this(name, mapName, mapInformation) { _savedGame = savedGame; }
/// <summary> /// Constructor of the <c>ChangingGame</c> class. /// </summary> /// <param name="mapName">Name of the map where the player goes.</param> /// <param name="savedGame">Saved game to be used in the level.</param> public ChangingGame(string mapName, SavedGame savedGame) : this(mapName) { _savedGame = savedGame; }