2025-12-04 15:10:20 +01:00
|
|
|
using AppleHills.Core.Settings;
|
|
|
|
|
using Common.Input;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace Minigames.Airplane.Settings
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Settings for the airplane minigame.
|
|
|
|
|
/// Create via Assets > Create > AppleHills > Settings > Airplane
|
|
|
|
|
/// </summary>
|
|
|
|
|
[CreateAssetMenu(fileName = "AirplaneSettings", menuName = "AppleHills/Settings/Airplane", order = 9)]
|
|
|
|
|
public class AirplaneSettings : BaseSettings, IAirplaneSettings
|
|
|
|
|
{
|
|
|
|
|
[Header("Slingshot Configuration")]
|
|
|
|
|
[SerializeField] private SlingshotConfig slingshotSettings = new SlingshotConfig
|
|
|
|
|
{
|
|
|
|
|
maxDragDistance = 5f,
|
|
|
|
|
baseLaunchForce = 20f,
|
|
|
|
|
minForceMultiplier = 0.1f,
|
|
|
|
|
maxForceMultiplier = 1f,
|
|
|
|
|
trajectoryPoints = 20,
|
|
|
|
|
trajectoryTimeStep = 0.1f,
|
|
|
|
|
trajectoryLockDuration = 0f, // No locking for airplane
|
|
|
|
|
autoRegisterInput = true // Direct registration
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
[Header("Flight Settings")]
|
|
|
|
|
[Tooltip("Mass of the airplane")]
|
|
|
|
|
[SerializeField] private float airplaneMass = 1f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Maximum flight time before timeout (seconds)")]
|
|
|
|
|
[SerializeField] private float maxFlightTime = 10f;
|
|
|
|
|
|
|
|
|
|
[Header("Timing")]
|
|
|
|
|
[Tooltip("Duration of intro sequence (seconds)")]
|
|
|
|
|
[SerializeField] private float introDuration = 1f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Duration of person introduction (seconds)")]
|
|
|
|
|
[SerializeField] private float personIntroDuration = 1f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Duration of result evaluation (seconds)")]
|
|
|
|
|
[SerializeField] private float evaluationDuration = 1f;
|
|
|
|
|
|
2025-12-05 16:24:44 +01:00
|
|
|
[Header("Spawn System")]
|
|
|
|
|
[Tooltip("X position where dynamic spawning begins")]
|
|
|
|
|
[SerializeField] private float dynamicSpawnThreshold = 10f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Minimum random distance for target spawn")]
|
|
|
|
|
[SerializeField] private float targetMinDistance = 30f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Maximum random distance for target spawn")]
|
|
|
|
|
[SerializeField] private float targetMaxDistance = 50f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Minimum time interval between object spawns (seconds)")]
|
|
|
|
|
[SerializeField] private float objectSpawnMinInterval = 1f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Maximum time interval between object spawns (seconds)")]
|
|
|
|
|
[SerializeField] private float objectSpawnMaxInterval = 3f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Ratio of positive to negative objects (0 = all negative, 1 = all positive)")]
|
|
|
|
|
[Range(0f, 1f)]
|
|
|
|
|
[SerializeField] private float positiveNegativeRatio = 0.5f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Distance ahead of plane to spawn objects")]
|
|
|
|
|
[SerializeField] private float spawnDistanceAhead = 15f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Distance interval for ground tile spawning")]
|
|
|
|
|
[SerializeField] private float groundSpawnInterval = 5f;
|
|
|
|
|
|
|
|
|
|
[Header("Ground Snapping")]
|
|
|
|
|
[Tooltip("Layer for ground detection (objects will snap to this)")]
|
|
|
|
|
[Layer]
|
|
|
|
|
[SerializeField] private int groundLayer = 0; // Default layer
|
|
|
|
|
|
|
|
|
|
[Tooltip("Maximum distance to raycast for ground")]
|
|
|
|
|
[SerializeField] private float maxGroundRaycastDistance = 50f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Default Y offset for objects if no ground found")]
|
|
|
|
|
[SerializeField] private float defaultObjectYOffset = 0f;
|
|
|
|
|
|
2025-12-04 15:10:20 +01:00
|
|
|
[Header("Debug")]
|
|
|
|
|
[Tooltip("Show debug logs in console")]
|
|
|
|
|
[SerializeField] private bool showDebugLogs;
|
|
|
|
|
|
|
|
|
|
#region IAirplaneSettings Implementation
|
|
|
|
|
|
|
|
|
|
public SlingshotConfig SlingshotSettings => slingshotSettings;
|
|
|
|
|
public float AirplaneMass => airplaneMass;
|
|
|
|
|
public float MaxFlightTime => maxFlightTime;
|
|
|
|
|
public float IntroDuration => introDuration;
|
|
|
|
|
public float PersonIntroDuration => personIntroDuration;
|
|
|
|
|
public float EvaluationDuration => evaluationDuration;
|
2025-12-05 16:24:44 +01:00
|
|
|
public float DynamicSpawnThreshold => dynamicSpawnThreshold;
|
|
|
|
|
public float TargetMinDistance => targetMinDistance;
|
|
|
|
|
public float TargetMaxDistance => targetMaxDistance;
|
|
|
|
|
public float ObjectSpawnMinInterval => objectSpawnMinInterval;
|
|
|
|
|
public float ObjectSpawnMaxInterval => objectSpawnMaxInterval;
|
|
|
|
|
public float PositiveNegativeRatio => positiveNegativeRatio;
|
|
|
|
|
public float SpawnDistanceAhead => spawnDistanceAhead;
|
|
|
|
|
public float GroundSpawnInterval => groundSpawnInterval;
|
|
|
|
|
public int GroundLayer => groundLayer;
|
|
|
|
|
public float MaxGroundRaycastDistance => maxGroundRaycastDistance;
|
|
|
|
|
public float DefaultObjectYOffset => defaultObjectYOffset;
|
2025-12-04 15:10:20 +01:00
|
|
|
public bool ShowDebugLogs => showDebugLogs;
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|