/// <summary> /// A method that adds locations to the current state of the world. /// </summary> public void CreateEnviroment(Dictionary <LocationStatic, LocationDynamic> locations) { // Add locations to the dynamic component of the current state of the world. currentStoryState.AddLocations(locations); // Create an empty list of static components of locations. List <LocationStatic> locationsList = new List <LocationStatic>(); // We go through the list of locations, adding their static components to an empty list. foreach (var location in locations) { locationsList.Add(location.Key); } // Assign the list of static components of locations to the static component to the current state of the world. currentStoryState.GetStaticWorldPart().AddLocations(locationsList); }