コード例 #1
0
        private static XElement serialize()
        {
            var world = TestWorldBuilder.createTestWorld(10, 10);
            var store = new GenericDatastore(world);

            var list = store.RootRecord.GetList("Towns", r => new Town(null, r));

            var town = new Town(createService(), store.RootRecord.CreateRecord());

            town.SetTownCenter(world.GetVoxel(new Point2(3, 8)));
            list.Add(town);

            town.AddVoxel(world.GetVoxel(new Point2(3, 7)));

            var doc = store.Serialize();

            return(doc);
        }