예제 #1
0
        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));
        }
예제 #2
0
 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);
 }
예제 #3
0
 public WorldData(TerrainData terrain, EntitiesData entities)
 {
     this.terrain  = terrain;
     this.entities = entities;
 }