Implement MVP for the statue decoration minigame (#65)
MVP implemented with: - placing, removing etc. decorations - saving the state, displaying it on the map, restoring when game restarts - saving screenshots to folder on device Co-authored-by: Michal Pikulski <michal@foolhardyhorizons.com> Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com> Reviewed-on: #65
This commit is contained in:
71
Assets/Scripts/Utils/PhotoCaptureConfig.cs
Normal file
71
Assets/Scripts/Utils/PhotoCaptureConfig.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user