private void RegisterCallbacks(PriorityCallbacks <DungeonGeneratorPostProcessCallback> callbacks) { if (config.InitializeSharedTilemaps) { callbacks.RegisterCallback(PostProcessPriorities.InitializeSharedTilemaps, (level, description) => { // PostProcessUtils.InitializeSharedTilemaps(level, tilemapLayersHandler, config.TilemapMaterial); PostProcessUtils.InitializeSharedTilemaps(level, config.TilemapLayersStructure, defaultTilemapLayersHandlerFactory(), config.TilemapLayersHandler, config.TilemapLayersExample, config.TilemapMaterial); PostProcessUtils.SetTilemapsMaterial(level, config.TilemapMaterial); }); } if (config.CopyTilesToSharedTilemaps) { callbacks.RegisterCallback(PostProcessPriorities.CopyTilesToSharedTilemaps, (level, description) => { PostProcessUtils.CopyTilesToSharedTilemaps(level); }); } if (config.CenterGrid) { callbacks.RegisterCallback(PostProcessPriorities.CenterGrid, (level, description) => { PostProcessUtils.CenterGrid(level); }); } if (config.DisableRoomTemplatesRenderers) { callbacks.RegisterCallback(PostProcessPriorities.DisableRoomTemplateRenderers, (level, description) => { PostProcessUtils.DisableRoomTemplatesRenderers(level); }); } if (config.DisableRoomTemplatesColliders) { callbacks.RegisterCallback(PostProcessPriorities.DisableRoomTemplateColliders, (level, description) => { PostProcessUtils.DisableRoomTemplatesColliders(level); }); } }
/// <summary> /// Disables colliders of individual room template tilemaps in the generated level. /// The goal is to try to keep triggers functioning. /// </summary> /// <param name="level"></param> public static void DisableRoomTemplateColliders(GeneratedLevel level) { PostProcessUtils.DisableRoomTemplatesColliders(level); }