Add pinch controls to statue dressup game
This commit is contained in:
@@ -228,6 +228,10 @@ namespace AppleHills.Core.Settings
|
||||
bool EnableStatePersistence { get; }
|
||||
string StateSaveKey { get; }
|
||||
int MaxSavedDecorations { get; }
|
||||
|
||||
// Pinch Controls
|
||||
float MinDecorationScale { get; }
|
||||
float MaxDecorationScale { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -90,6 +90,13 @@ namespace Core.Settings
|
||||
[Tooltip("Maximum number of decorations to save")]
|
||||
[SerializeField] private int maxSavedDecorations = 50;
|
||||
|
||||
[Header("Pinch Controls")]
|
||||
[Tooltip("Minimum scale for decorations when using pinch controls")]
|
||||
[SerializeField] private float minDecorationScale = 0.1f;
|
||||
|
||||
[Tooltip("Maximum scale for decorations when using pinch controls")]
|
||||
[SerializeField] private float maxDecorationScale = 2.0f;
|
||||
|
||||
// IStatueDressupSettings implementation - Decoration Display
|
||||
public Vector2 DefaultAuthoredSize => defaultAuthoredSize;
|
||||
|
||||
@@ -136,6 +143,10 @@ namespace Core.Settings
|
||||
public string StateSaveKey => stateSaveKey;
|
||||
public int MaxSavedDecorations => maxSavedDecorations;
|
||||
|
||||
// IStatueDressupSettings implementation - Pinch Controls
|
||||
public float MinDecorationScale => minDecorationScale;
|
||||
public float MaxDecorationScale => maxDecorationScale;
|
||||
|
||||
public override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
@@ -168,6 +179,10 @@ namespace Core.Settings
|
||||
|
||||
// Validate state persistence
|
||||
maxSavedDecorations = Mathf.Max(1, maxSavedDecorations);
|
||||
|
||||
// Validate pinch controls
|
||||
minDecorationScale = Mathf.Max(0.01f, minDecorationScale);
|
||||
maxDecorationScale = Mathf.Max(minDecorationScale + 0.1f, maxDecorationScale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user