72 lines
2.0 KiB
C#
72 lines
2.0 KiB
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
|
|||
|
|
namespace Utils
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// Capture types for different photo contexts
|
|||
|
|
/// </summary>
|
|||
|
|
public enum CaptureType
|
|||
|
|
{
|
|||
|
|
StatueMinigame,
|
|||
|
|
DivingMinigame
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Configuration for a specific capture type
|
|||
|
|
/// </summary>
|
|||
|
|
[Serializable]
|
|||
|
|
public class CaptureConfig
|
|||
|
|
{
|
|||
|
|
public string subFolder;
|
|||
|
|
public string photoPrefix;
|
|||
|
|
public string metadataPrefix;
|
|||
|
|
public string indexKey;
|
|||
|
|
|
|||
|
|
public CaptureConfig(string subFolder, string photoPrefix, string metadataPrefix, string indexKey)
|
|||
|
|
{
|
|||
|
|
this.subFolder = subFolder;
|
|||
|
|
this.photoPrefix = photoPrefix;
|
|||
|
|
this.metadataPrefix = metadataPrefix;
|
|||
|
|
this.indexKey = indexKey;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Static configuration registry for all capture types
|
|||
|
|
/// </summary>
|
|||
|
|
public static class PhotoCaptureConfigs
|
|||
|
|
{
|
|||
|
|
private static readonly Dictionary<CaptureType, CaptureConfig> Configs = new Dictionary<CaptureType, CaptureConfig>
|
|||
|
|
{
|
|||
|
|
[CaptureType.StatueMinigame] = new CaptureConfig(
|
|||
|
|
subFolder: "StatueMinigame",
|
|||
|
|
photoPrefix: "Statue_",
|
|||
|
|
metadataPrefix: "StatuePhoto_Meta_",
|
|||
|
|
indexKey: "StatuePhoto_Index"
|
|||
|
|
),
|
|||
|
|
|
|||
|
|
[CaptureType.DivingMinigame] = new CaptureConfig(
|
|||
|
|
subFolder: "DivingMinigame",
|
|||
|
|
photoPrefix: "Diving_",
|
|||
|
|
metadataPrefix: "DivingPhoto_Meta_",
|
|||
|
|
indexKey: "DivingPhoto_Index"
|
|||
|
|
)
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Get configuration for a specific capture type
|
|||
|
|
/// </summary>
|
|||
|
|
public static CaptureConfig GetConfig(CaptureType type)
|
|||
|
|
{
|
|||
|
|
if (Configs.TryGetValue(type, out CaptureConfig config))
|
|||
|
|
{
|
|||
|
|
return config;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
throw new ArgumentException($"No configuration found for CaptureType: {type}");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|