public static WorldData LoadWorld(string str) { TerrainData terrain = (TerrainData)Load(dir + worlddir + str + "\\" + worldFile); EntitiesData entities = (EntitiesData)Load(dir + worlddir + str + "\\" + entityFile); return(new WorldData(terrain, entities)); }
public static void SaveWorld(string file, TerrainData world, EntitiesData entities) { Directory.CreateDirectory(dir + worlddir + file); FileUtil.EmptyDirectory(dir + worlddir + file); Save(dir + worlddir + file + "\\" + worldFile, world); Save(dir + worlddir + file + "\\" + entityFile, entities); }
public WorldData(TerrainData terrain, EntitiesData entities) { this.terrain = terrain; this.entities = entities; }