} private static void PopulateExampleMap(ref Gears.Cartography.Map map) { map.VERSION = "0.1.5"; map.BGM_FILE_LOC = "BGM_FILE_LOC DIRECTORY test"; map.FADE_IN_FILE_LOC = "FADE_IN_FILE_LOC DIRECTORY test"; map.FADE_OUT_FILE_LOC = "FADE_OUT_FILE_LOC DIRECTORY test"; map.BG_IMAGE_FILE_LOC = "BG_IMAGE_FILE_LOC DIRECTORY test"; map.NUM_LAYERS = 5;
private static void PopulateExampleMap(ref Gears.Cartography.Map map) { map.VERSION = "0.1.5"; map.BGM_FILE_LOC = "BGM_FILE_LOC DIRECTORY test"; map.FADE_IN_FILE_LOC = "FADE_IN_FILE_LOC DIRECTORY test"; map.FADE_OUT_FILE_LOC = "FADE_OUT_FILE_LOC DIRECTORY test"; map.BG_IMAGE_FILE_LOC = "BG_IMAGE_FILE_LOC DIRECTORY test"; map.NUM_LAYERS = 5; map.LAYER_WIDTH_TILES = 80; map.LAYER_HEIGHT_TILES = 35; map.TILE_DATA = "453tgfd,346tw,4e5trfr5,34tegdr,45tr"; }
public void DebugSerialize(string SAVE_LOCATION) { map0 = new Map(); PopulateFields(); SerializeToXML(map0, SAVE_LOCATION); }
private static void SerializeToXML(Map map, string SAVE_LOCATION) { using (TextWriter textWriter = new StreamWriter(SAVE_LOCATION)) { XmlSerializer serializer = new XmlSerializer(typeof(Map)); serializer.Serialize(textWriter, map); textWriter.Close(); } }
//ASSIGNMENTS ARE FOR TESTING PURPOSES ONLY!!! protected Map(Map copyMe) { VERSION = copyMe.VERSION; BGM_FILE_LOC = copyMe.BGM_FILE_LOC; FADE_IN_FILE_LOC = copyMe.FADE_IN_FILE_LOC; FADE_OUT_FILE_LOC = copyMe.FADE_OUT_FILE_LOC; BG_IMAGE_FILE_LOC = copyMe.BG_IMAGE_FILE_LOC; NUM_LAYERS = copyMe.NUM_LAYERS; LAYER_WIDTH_TILES = copyMe.LAYER_WIDTH_TILES; LAYER_HEIGHT_TILES = copyMe.LAYER_HEIGHT_TILES; LAYERS = new layer[copyMe.LAYERS.Length]; for (int i = 0; i < LAYERS.Length; i++) LAYERS[i] = copyMe.LAYERS[i]; }