Add backbone for card creation and implement Camera minigame mechanics
This commit is contained in:
@@ -126,6 +126,38 @@ namespace AppleHills.Core.Settings
|
||||
[Tooltip("Whether to block player input during bump movement")]
|
||||
[SerializeField] private bool blockInputDuringBump = true;
|
||||
|
||||
[Header("Camera Viewfinder")]
|
||||
[Tooltip("The prefab to use for the camera viewfinder UI")]
|
||||
[SerializeField] private GameObject viewfinderPrefab;
|
||||
|
||||
[Tooltip("Duration in seconds for the viewfinder to shrink")]
|
||||
[SerializeField] private float viewfinderShrinkDuration = 1.5f;
|
||||
|
||||
[Tooltip("Speed at which the viewfinder moves toward the target")]
|
||||
[SerializeField] private float viewfinderMoveSpeed = 5f;
|
||||
|
||||
[Tooltip("Animation curve for the shrinking effect")]
|
||||
[SerializeField] private AnimationCurve viewfinderShrinkCurve = AnimationCurve.EaseInOut(0, 1, 1, 0);
|
||||
|
||||
[Tooltip("Padding factor to add space around the monster (1.0 = exact size, 1.2 = 20% extra)")]
|
||||
[SerializeField] private float paddingFactor = 1.2f;
|
||||
|
||||
[Tooltip("Minimum size of the viewfinder as a percentage of screen width (0.15 = 15%)")]
|
||||
[SerializeField] private float minSizePercent = 0.15f;
|
||||
|
||||
[Tooltip("Maximum size of the viewfinder as a percentage of screen width (0.8 = 80%)")]
|
||||
[SerializeField] private float maxSizePercent = 0.8f;
|
||||
|
||||
|
||||
[Tooltip("Starting scale of the viewfinder (relative to screen width)")]
|
||||
[SerializeField] private float viewfinderStartScale = 1.0f;
|
||||
|
||||
[Tooltip("Final scale of the viewfinder")]
|
||||
[SerializeField] private float viewfinderEndScale = 0.25f;
|
||||
|
||||
[Tooltip("Progress percentages at which to trigger events (0-1)")]
|
||||
[SerializeField] private float[] viewfinderProgressThresholds = new float[] { 0.25f, 0.5f, 0.75f, 1.0f };
|
||||
|
||||
// IDivingMinigameSettings implementation - Basic Movement
|
||||
public float LerpSpeed => lerpSpeed;
|
||||
public float MaxOffset => maxOffset;
|
||||
@@ -177,6 +209,18 @@ namespace AppleHills.Core.Settings
|
||||
public float SmoothMoveSpeed => smoothMoveSpeed;
|
||||
public bool BlockInputDuringBump => blockInputDuringBump;
|
||||
|
||||
// IDivingMinigameSettings implementation - Camera Viewfinder
|
||||
public GameObject ViewfinderPrefab => viewfinderPrefab;
|
||||
public float ViewfinderShrinkDuration => viewfinderShrinkDuration;
|
||||
public float ViewfinderMoveSpeed => viewfinderMoveSpeed;
|
||||
public AnimationCurve ViewfinderShrinkCurve => viewfinderShrinkCurve;
|
||||
public float ViewfinderStartScale => viewfinderStartScale;
|
||||
public float ViewfinderEndScale => viewfinderEndScale;
|
||||
public float[] ViewfinderProgressThresholds => viewfinderProgressThresholds;
|
||||
public float PaddingFactor => paddingFactor;
|
||||
public float MaxSizePercent => maxSizePercent;
|
||||
public float MinSizePercent => minSizePercent;
|
||||
|
||||
public override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
@@ -238,6 +282,16 @@ namespace AppleHills.Core.Settings
|
||||
damageImmunityDuration = Mathf.Max(0.1f, damageImmunityDuration);
|
||||
bumpForce = Mathf.Max(0.1f, bumpForce);
|
||||
smoothMoveSpeed = Mathf.Max(0.1f, smoothMoveSpeed);
|
||||
|
||||
// Validate camera viewfinder settings
|
||||
viewfinderShrinkDuration = Mathf.Max(0.1f, viewfinderShrinkDuration);
|
||||
viewfinderMoveSpeed = Mathf.Max(0.1f, viewfinderMoveSpeed);
|
||||
viewfinderStartScale = Mathf.Max(0.01f, viewfinderStartScale);
|
||||
viewfinderEndScale = Mathf.Max(viewfinderStartScale, viewfinderEndScale);
|
||||
for (int i = 0; i < viewfinderProgressThresholds.Length; i++)
|
||||
{
|
||||
viewfinderProgressThresholds[i] = Mathf.Clamp01(viewfinderProgressThresholds[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,5 +108,17 @@ namespace AppleHills.Core.Settings
|
||||
float BumpForce { get; }
|
||||
float SmoothMoveSpeed { get; }
|
||||
bool BlockInputDuringBump { get; }
|
||||
|
||||
// Camera Viewfinder Settings
|
||||
GameObject ViewfinderPrefab { get; }
|
||||
float ViewfinderShrinkDuration { get; }
|
||||
float ViewfinderMoveSpeed { get; }
|
||||
AnimationCurve ViewfinderShrinkCurve { get; }
|
||||
float ViewfinderStartScale { get; }
|
||||
float ViewfinderEndScale { get; }
|
||||
float[] ViewfinderProgressThresholds { get; }
|
||||
float PaddingFactor { get; }
|
||||
float MaxSizePercent { get; }
|
||||
float MinSizePercent { get; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user