private static Pool create_room_pool(LDtk content, FlyweightList[] prototypes, float cell_size) { Pool rooms = new Pool(); foreach (var level in content.Levels) { rooms.add(create_room_data(level, prototypes, cell_size)); } return(rooms); }
void Awake() { content = json_to_LDtk("Assets/Resources/Voxel.ldtk"); rooms = create_room_pool(content, flyweights, cell_size); var world_data = create_world_data(PlayerSpawnPosition, rooms, flyweights, cell_size); world_data.cut_out_doors(flyweights[0]); world = create_world(world_data); }
void Awake() { content = json_to_LDtk("Assets/Resources/Voxel.ldtk"); rooms = create_room_pool(content, flyweights, special_layer, cell_size); world_data = create_world_data(PlayerSpawnPosition, rooms, flyweights, cell_size, ref last_room); world_data.cut_out_doors(flyweights[0]); world = create_world(world_data, last_room, goal); EnemyController.RG = this; }
private static LDtk json_to_LDtk(string path) { var json = file_to_string(path); return(LDtk.FromJson(json)); }