public static void GenerateInitData() { InitialSaveFileCreator i = new InitialSaveFileCreator(); World world = new World(i.CreateEmptyRelay()); SimpleRoomBuilder srb = new SimpleRoomBuilder(world.roomRunner); srb.CreateRoomWithSize("Eden", 5, 5); srb.CreateRoomWithSize("Hallway", 5, 5); srb.CreateRoomWithSize("Kitchen", 10, 5); srb.CreateRoomWithSize("Bedroom", 5, 5); world.tingRunner.CreateTing <Character>("Adam", new WorldCoordinate("Eden", new IntPoint(0, 0))); world.tingRunner.CreateTing <Character>("Eva", new WorldCoordinate("Eden", new IntPoint(4, 4))); MysticalCube c = world.tingRunner.CreateTing <MysticalCube>("PowerCube", new WorldCoordinate("Eden", new IntPoint(2, 2))); c.onInteractionSourceCodeName = "PowerCube"; world.relay.SaveTableSubsetSeparately(Room.TABLE_NAME, INIT_DATA_PATH + "Rooms.json"); RelayLib.RelayTwo tingSubset = new RelayLib.RelayTwo(); foreach (string table in world.tingRunner.loadedTingTables) { tingSubset.MergeWith(world.relay.Subset(table, (o) => { return(true); })); } tingSubset.SaveAll(INIT_DATA_PATH + "Tings.json"); }
public static void GenerateInitData() { InitialSaveFileCreator i = new InitialSaveFileCreator(); World world = new World(i.CreateEmptyRelay()); SimpleRoomBuilder srb = new SimpleRoomBuilder(world.roomRunner); srb.CreateRoomWithSize("Eden", 5, 5); srb.CreateRoomWithSize("Hallway", 5, 5); srb.CreateRoomWithSize("Kitchen", 10, 5); srb.CreateRoomWithSize("Bedroom", 5, 5); world.tingRunner.CreateTing<Character>("Adam", new WorldCoordinate("Eden", new IntPoint(0, 0))); world.tingRunner.CreateTing<Character>("Eva", new WorldCoordinate("Eden", new IntPoint(4, 4))); MysticalCube c = world.tingRunner.CreateTing<MysticalCube>("PowerCube", new WorldCoordinate("Eden", new IntPoint(2, 2))); c.onInteractionSourceCodeName = "PowerCube"; world.relay.SaveTableSubsetSeparately(Room.TABLE_NAME, INIT_DATA_PATH + "Rooms.json"); RelayLib.RelayTwo tingSubset = new RelayLib.RelayTwo(); foreach(string table in world.tingRunner.loadedTingTables) tingSubset.MergeWith(world.relay.Subset(table, (o) => { return true; })); tingSubset.SaveAll(INIT_DATA_PATH + "Tings.json"); }