|
|
|
|
@@ -8,227 +8,227 @@ namespace AppleHills.Core.Settings
|
|
|
|
|
[CreateAssetMenu(fileName = "MinigameSettings", menuName = "AppleHills/Settings/Minigames", order = 3)]
|
|
|
|
|
public class DivingMinigameSettings : BaseSettings, IDivingMinigameSettings
|
|
|
|
|
{
|
|
|
|
|
[Header("Endless Descender - Basic Movement")]
|
|
|
|
|
[Header("Basic Movement")]
|
|
|
|
|
[Tooltip("How quickly the character follows the finger horizontally (higher = more responsive)")]
|
|
|
|
|
[SerializeField] private float endlessDescenderLerpSpeed = 12f;
|
|
|
|
|
[SerializeField] private float lerpSpeed = 12f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Maximum horizontal offset allowed between character and finger position")]
|
|
|
|
|
[SerializeField] private float endlessDescenderMaxOffset = 3f;
|
|
|
|
|
[SerializeField] private float maxOffset = 3f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Minimum allowed X position for endless descender movement")]
|
|
|
|
|
[SerializeField] private float endlessDescenderClampXMin = -3.5f;
|
|
|
|
|
[Tooltip("Minimum allowed X position for movement")]
|
|
|
|
|
[SerializeField] private float clampXMin = -3.5f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Maximum allowed X position for endless descender movement")]
|
|
|
|
|
[SerializeField] private float endlessDescenderClampXMax = 3.5f;
|
|
|
|
|
[Tooltip("Maximum allowed X position for movement")]
|
|
|
|
|
[SerializeField] private float clampXMax = 3.5f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Exponent for speed drop-off curve (higher = sharper drop near target)")]
|
|
|
|
|
[SerializeField] private float endlessDescenderSpeedExponent = 2.5f;
|
|
|
|
|
[SerializeField] private float speedExponent = 2.5f;
|
|
|
|
|
|
|
|
|
|
[Header("Endless Descender - Player Movement")]
|
|
|
|
|
[Header("Player Movement")]
|
|
|
|
|
[Tooltip("Maximum distance the player can move from a single tap")]
|
|
|
|
|
[SerializeField] private float endlessDescenderTapMaxDistance = 0.5f;
|
|
|
|
|
[SerializeField] private float tapMaxDistance = 0.5f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("How quickly the tap impulse fades (higher = faster stop)")]
|
|
|
|
|
[SerializeField] private float endlessDescenderTapDecelerationRate = 5.0f;
|
|
|
|
|
[SerializeField] private float tapDecelerationRate = 5.0f;
|
|
|
|
|
|
|
|
|
|
[Header("Endless Descender - Monster Spawning")]
|
|
|
|
|
[Header("Monster Spawning")]
|
|
|
|
|
[Tooltip("Base chance (0-1) of spawning a monster on each tile")]
|
|
|
|
|
[SerializeField] private float endlessDescenderBaseSpawnProbability = 0.2f;
|
|
|
|
|
[SerializeField] private float baseSpawnProbability = 0.2f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Maximum chance (0-1) of spawning a monster")]
|
|
|
|
|
[SerializeField] private float endlessDescenderMaxSpawnProbability = 0.5f;
|
|
|
|
|
[SerializeField] private float maxSpawnProbability = 0.5f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("How fast the probability increases per second")]
|
|
|
|
|
[SerializeField] private float endlessDescenderProbabilityIncreaseRate = 0.01f;
|
|
|
|
|
[SerializeField] private float probabilityIncreaseRate = 0.01f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Force a spawn after this many seconds without spawns")]
|
|
|
|
|
[SerializeField] private float endlessDescenderGuaranteedSpawnTime = 30f;
|
|
|
|
|
[SerializeField] private float guaranteedSpawnTime = 30f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Minimum time between monster spawns")]
|
|
|
|
|
[SerializeField] private float endlessDescenderSpawnCooldown = 5f;
|
|
|
|
|
[SerializeField] private float spawnCooldown = 5f;
|
|
|
|
|
|
|
|
|
|
[Header("Endless Descender - Scoring")]
|
|
|
|
|
[Header("Scoring")]
|
|
|
|
|
[Tooltip("Base points for taking a picture")]
|
|
|
|
|
[SerializeField] private int endlessDescenderBasePoints = 100;
|
|
|
|
|
[SerializeField] private int basePoints = 100;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Additional points per depth unit")]
|
|
|
|
|
[SerializeField] private int endlessDescenderDepthMultiplier = 10;
|
|
|
|
|
[SerializeField] private int depthMultiplier = 10;
|
|
|
|
|
|
|
|
|
|
[Header("Endless Descender - Surfacing")]
|
|
|
|
|
[Header("Surfacing")]
|
|
|
|
|
[Tooltip("Duration in seconds for speed transition when surfacing")]
|
|
|
|
|
[SerializeField] private float endlessDescenderSpeedTransitionDuration = 2.0f;
|
|
|
|
|
[SerializeField] private float speedTransitionDuration = 2.0f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Factor to multiply speed by when surfacing (usually 1.0 for same speed)")]
|
|
|
|
|
[SerializeField] private float endlessDescenderSurfacingSpeedFactor = 3.0f;
|
|
|
|
|
[SerializeField] private float surfacingSpeedFactor = 3.0f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("How long to continue spawning tiles after surfacing begins (seconds)")]
|
|
|
|
|
[SerializeField] private float endlessDescenderSurfacingSpawnDelay = 5.0f;
|
|
|
|
|
[SerializeField] private float surfacingSpawnDelay = 5.0f;
|
|
|
|
|
|
|
|
|
|
[Header("Endless Descender - Tile Generation")]
|
|
|
|
|
[Header("Tile Generation")]
|
|
|
|
|
[Tooltip("Initial number of tiles to create at start")]
|
|
|
|
|
[SerializeField] private int endlessDescenderInitialTileCount = 3;
|
|
|
|
|
[SerializeField] private int initialTileCount = 3;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Buffer distance for spawning new tiles")]
|
|
|
|
|
[SerializeField] private float endlessDescenderTileSpawnBuffer = 1f;
|
|
|
|
|
[SerializeField] private float tileSpawnBuffer = 1f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Base movement speed for tiles")]
|
|
|
|
|
[SerializeField] private float endlessDescenderMoveSpeed = 3f;
|
|
|
|
|
[SerializeField] private float moveSpeed = 3f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Factor to increase speed by each interval")]
|
|
|
|
|
[SerializeField] private float endlessDescenderSpeedUpFactor = 0.2f;
|
|
|
|
|
[SerializeField] private float speedUpFactor = 0.2f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Time interval between speed increases (seconds)")]
|
|
|
|
|
[SerializeField] private float endlessDescenderSpeedUpInterval = 10f;
|
|
|
|
|
[SerializeField] private float speedUpInterval = 10f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Maximum movement speed allowed")]
|
|
|
|
|
[SerializeField] private float endlessDescenderMaxMoveSpeed = 12f;
|
|
|
|
|
[SerializeField] private float maxMoveSpeed = 12f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Interval for velocity calculations (seconds)")]
|
|
|
|
|
[SerializeField] private float endlessDescenderVelocityCalculationInterval = 0.5f;
|
|
|
|
|
[SerializeField] private float velocityCalculationInterval = 0.5f;
|
|
|
|
|
|
|
|
|
|
[Header("Endless Descender - Obstacles")]
|
|
|
|
|
[Header("Obstacles")]
|
|
|
|
|
[Tooltip("Time interval between obstacle spawn attempts (in seconds)")]
|
|
|
|
|
[SerializeField] private float endlessDescenderObstacleSpawnInterval = 2f;
|
|
|
|
|
[SerializeField] private float obstacleSpawnInterval = 2f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Random variation in obstacle spawn timing (+/- seconds)")]
|
|
|
|
|
[SerializeField] private float endlessDescenderObstacleSpawnIntervalVariation = 0.5f;
|
|
|
|
|
[SerializeField] private float obstacleSpawnIntervalVariation = 0.5f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Maximum number of obstacle spawn position attempts before skipping")]
|
|
|
|
|
[SerializeField] private int endlessDescenderObstacleMaxSpawnAttempts = 10;
|
|
|
|
|
[SerializeField] private int obstacleMaxSpawnAttempts = 10;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Radius around obstacle spawn point to check for tile collisions")]
|
|
|
|
|
[SerializeField] private float endlessDescenderObstacleSpawnCollisionRadius = 1f;
|
|
|
|
|
[SerializeField] private float obstacleSpawnCollisionRadius = 1f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Minimum movement speed for spawned obstacles")]
|
|
|
|
|
[SerializeField] private float endlessDescenderObstacleMinMoveSpeed = 1f;
|
|
|
|
|
[SerializeField] private float obstacleMinMoveSpeed = 1f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Maximum movement speed for spawned obstacles")]
|
|
|
|
|
[SerializeField] private float endlessDescenderObstacleMaxMoveSpeed = 4f;
|
|
|
|
|
[SerializeField] private float obstacleMaxMoveSpeed = 4f;
|
|
|
|
|
|
|
|
|
|
[Header("Endless Descender - Collision Handling")]
|
|
|
|
|
[Header("Collision Handling")]
|
|
|
|
|
[Tooltip("Duration in seconds of damage immunity after being hit")]
|
|
|
|
|
[SerializeField] private float endlessDescenderDamageImmunityDuration = 1.0f;
|
|
|
|
|
[SerializeField] private float damageImmunityDuration = 1.0f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Force strength for impulse bumps - higher values push further toward center")]
|
|
|
|
|
[SerializeField] private float endlessDescenderBumpForce = 5.0f;
|
|
|
|
|
[SerializeField] private float bumpForce = 5.0f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Speed for smooth movement to center (units per second)")]
|
|
|
|
|
[SerializeField] private float endlessDescenderSmoothMoveSpeed = 8.0f;
|
|
|
|
|
[SerializeField] private float smoothMoveSpeed = 8.0f;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Whether to block player input during bump movement")]
|
|
|
|
|
[SerializeField] private bool endlessDescenderBlockInputDuringBump = true;
|
|
|
|
|
[SerializeField] private bool blockInputDuringBump = true;
|
|
|
|
|
|
|
|
|
|
// IMinigameSettings implementation - Basic Movement
|
|
|
|
|
public float EndlessDescenderLerpSpeed => endlessDescenderLerpSpeed;
|
|
|
|
|
public float EndlessDescenderMaxOffset => endlessDescenderMaxOffset;
|
|
|
|
|
public float EndlessDescenderClampXMin => endlessDescenderClampXMin;
|
|
|
|
|
public float EndlessDescenderClampXMax => endlessDescenderClampXMax;
|
|
|
|
|
public float EndlessDescenderSpeedExponent => endlessDescenderSpeedExponent;
|
|
|
|
|
// IDivingMinigameSettings implementation - Basic Movement
|
|
|
|
|
public float LerpSpeed => lerpSpeed;
|
|
|
|
|
public float MaxOffset => maxOffset;
|
|
|
|
|
public float ClampXMin => clampXMin;
|
|
|
|
|
public float ClampXMax => clampXMax;
|
|
|
|
|
public float SpeedExponent => speedExponent;
|
|
|
|
|
|
|
|
|
|
// IMinigameSettings implementation - Player Movement
|
|
|
|
|
public float EndlessDescenderTapMaxDistance => endlessDescenderTapMaxDistance;
|
|
|
|
|
public float EndlessDescenderTapDecelerationRate => endlessDescenderTapDecelerationRate;
|
|
|
|
|
// IDivingMinigameSettings implementation - Player Movement
|
|
|
|
|
public float TapMaxDistance => tapMaxDistance;
|
|
|
|
|
public float TapDecelerationRate => tapDecelerationRate;
|
|
|
|
|
|
|
|
|
|
// IMinigameSettings implementation - Monster Spawning
|
|
|
|
|
public float EndlessDescenderBaseSpawnProbability => endlessDescenderBaseSpawnProbability;
|
|
|
|
|
public float EndlessDescenderMaxSpawnProbability => endlessDescenderMaxSpawnProbability;
|
|
|
|
|
public float EndlessDescenderProbabilityIncreaseRate => endlessDescenderProbabilityIncreaseRate;
|
|
|
|
|
public float EndlessDescenderGuaranteedSpawnTime => endlessDescenderGuaranteedSpawnTime;
|
|
|
|
|
public float EndlessDescenderSpawnCooldown => endlessDescenderSpawnCooldown;
|
|
|
|
|
// IDivingMinigameSettings implementation - Monster Spawning
|
|
|
|
|
public float BaseSpawnProbability => baseSpawnProbability;
|
|
|
|
|
public float MaxSpawnProbability => maxSpawnProbability;
|
|
|
|
|
public float ProbabilityIncreaseRate => probabilityIncreaseRate;
|
|
|
|
|
public float GuaranteedSpawnTime => guaranteedSpawnTime;
|
|
|
|
|
public float SpawnCooldown => spawnCooldown;
|
|
|
|
|
|
|
|
|
|
// IMinigameSettings implementation - Scoring
|
|
|
|
|
public int EndlessDescenderBasePoints => endlessDescenderBasePoints;
|
|
|
|
|
public int EndlessDescenderDepthMultiplier => endlessDescenderDepthMultiplier;
|
|
|
|
|
// IDivingMinigameSettings implementation - Scoring
|
|
|
|
|
public int BasePoints => basePoints;
|
|
|
|
|
public int DepthMultiplier => depthMultiplier;
|
|
|
|
|
|
|
|
|
|
// IMinigameSettings implementation - Surfacing
|
|
|
|
|
public float EndlessDescenderSpeedTransitionDuration => endlessDescenderSpeedTransitionDuration;
|
|
|
|
|
public float EndlessDescenderSurfacingSpeedFactor => endlessDescenderSurfacingSpeedFactor;
|
|
|
|
|
public float EndlessDescenderSurfacingSpawnDelay => endlessDescenderSurfacingSpawnDelay;
|
|
|
|
|
// IDivingMinigameSettings implementation - Surfacing
|
|
|
|
|
public float SpeedTransitionDuration => speedTransitionDuration;
|
|
|
|
|
public float SurfacingSpeedFactor => surfacingSpeedFactor;
|
|
|
|
|
public float SurfacingSpawnDelay => surfacingSpawnDelay;
|
|
|
|
|
|
|
|
|
|
// IMinigameSettings implementation - Tile Generation
|
|
|
|
|
public int EndlessDescenderInitialTileCount => endlessDescenderInitialTileCount;
|
|
|
|
|
public float EndlessDescenderTileSpawnBuffer => endlessDescenderTileSpawnBuffer;
|
|
|
|
|
public float EndlessDescenderMoveSpeed => endlessDescenderMoveSpeed;
|
|
|
|
|
public float EndlessDescenderSpeedUpFactor => endlessDescenderSpeedUpFactor;
|
|
|
|
|
public float EndlessDescenderSpeedUpInterval => endlessDescenderSpeedUpInterval;
|
|
|
|
|
public float EndlessDescenderMaxMoveSpeed => endlessDescenderMaxMoveSpeed;
|
|
|
|
|
public float EndlessDescenderVelocityCalculationInterval => endlessDescenderVelocityCalculationInterval;
|
|
|
|
|
// IDivingMinigameSettings implementation - Tile Generation
|
|
|
|
|
public int InitialTileCount => initialTileCount;
|
|
|
|
|
public float TileSpawnBuffer => tileSpawnBuffer;
|
|
|
|
|
public float MoveSpeed => moveSpeed;
|
|
|
|
|
public float SpeedUpFactor => speedUpFactor;
|
|
|
|
|
public float SpeedUpInterval => speedUpInterval;
|
|
|
|
|
public float MaxMoveSpeed => maxMoveSpeed;
|
|
|
|
|
public float VelocityCalculationInterval => velocityCalculationInterval;
|
|
|
|
|
|
|
|
|
|
// IMinigameSettings implementation - Obstacles
|
|
|
|
|
public float EndlessDescenderObstacleSpawnInterval => endlessDescenderObstacleSpawnInterval;
|
|
|
|
|
public float EndlessDescenderObstacleSpawnIntervalVariation => endlessDescenderObstacleSpawnIntervalVariation;
|
|
|
|
|
public int EndlessDescenderObstacleMaxSpawnAttempts => endlessDescenderObstacleMaxSpawnAttempts;
|
|
|
|
|
public float EndlessDescenderObstacleSpawnCollisionRadius => endlessDescenderObstacleSpawnCollisionRadius;
|
|
|
|
|
public float EndlessDescenderObstacleMinMoveSpeed => endlessDescenderObstacleMinMoveSpeed;
|
|
|
|
|
public float EndlessDescenderObstacleMaxMoveSpeed => endlessDescenderObstacleMaxMoveSpeed;
|
|
|
|
|
// IDivingMinigameSettings implementation - Obstacles
|
|
|
|
|
public float ObstacleSpawnInterval => obstacleSpawnInterval;
|
|
|
|
|
public float ObstacleSpawnIntervalVariation => obstacleSpawnIntervalVariation;
|
|
|
|
|
public int ObstacleMaxSpawnAttempts => obstacleMaxSpawnAttempts;
|
|
|
|
|
public float ObstacleSpawnCollisionRadius => obstacleSpawnCollisionRadius;
|
|
|
|
|
public float ObstacleMinMoveSpeed => obstacleMinMoveSpeed;
|
|
|
|
|
public float ObstacleMaxMoveSpeed => obstacleMaxMoveSpeed;
|
|
|
|
|
|
|
|
|
|
// IMinigameSettings implementation - Collision Handling
|
|
|
|
|
public float EndlessDescenderDamageImmunityDuration => endlessDescenderDamageImmunityDuration;
|
|
|
|
|
public float EndlessDescenderBumpForce => endlessDescenderBumpForce;
|
|
|
|
|
public float EndlessDescenderSmoothMoveSpeed => endlessDescenderSmoothMoveSpeed;
|
|
|
|
|
public bool EndlessDescenderBlockInputDuringBump => endlessDescenderBlockInputDuringBump;
|
|
|
|
|
// IDivingMinigameSettings implementation - Collision Handling
|
|
|
|
|
public float DamageImmunityDuration => damageImmunityDuration;
|
|
|
|
|
public float BumpForce => bumpForce;
|
|
|
|
|
public float SmoothMoveSpeed => smoothMoveSpeed;
|
|
|
|
|
public bool BlockInputDuringBump => blockInputDuringBump;
|
|
|
|
|
|
|
|
|
|
public override void OnValidate()
|
|
|
|
|
{
|
|
|
|
|
base.OnValidate();
|
|
|
|
|
|
|
|
|
|
// Validate basic movement values
|
|
|
|
|
endlessDescenderLerpSpeed = Mathf.Max(0.1f, endlessDescenderLerpSpeed);
|
|
|
|
|
endlessDescenderMaxOffset = Mathf.Max(0.1f, endlessDescenderMaxOffset);
|
|
|
|
|
endlessDescenderSpeedExponent = Mathf.Max(0.1f, endlessDescenderSpeedExponent);
|
|
|
|
|
lerpSpeed = Mathf.Max(0.1f, lerpSpeed);
|
|
|
|
|
maxOffset = Mathf.Max(0.1f, maxOffset);
|
|
|
|
|
speedExponent = Mathf.Max(0.1f, speedExponent);
|
|
|
|
|
|
|
|
|
|
// Ensure min is less than max for clamping
|
|
|
|
|
if (endlessDescenderClampXMin >= endlessDescenderClampXMax)
|
|
|
|
|
if (clampXMin >= clampXMax)
|
|
|
|
|
{
|
|
|
|
|
endlessDescenderClampXMin = endlessDescenderClampXMax - 0.1f;
|
|
|
|
|
clampXMin = clampXMax - 0.1f;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Validate player movement
|
|
|
|
|
endlessDescenderTapMaxDistance = Mathf.Max(0.01f, endlessDescenderTapMaxDistance);
|
|
|
|
|
endlessDescenderTapDecelerationRate = Mathf.Max(0.1f, endlessDescenderTapDecelerationRate);
|
|
|
|
|
tapMaxDistance = Mathf.Max(0.01f, tapMaxDistance);
|
|
|
|
|
tapDecelerationRate = Mathf.Max(0.1f, tapDecelerationRate);
|
|
|
|
|
|
|
|
|
|
// Validate probability values
|
|
|
|
|
endlessDescenderBaseSpawnProbability = Mathf.Clamp01(endlessDescenderBaseSpawnProbability);
|
|
|
|
|
endlessDescenderMaxSpawnProbability = Mathf.Clamp01(endlessDescenderMaxSpawnProbability);
|
|
|
|
|
endlessDescenderProbabilityIncreaseRate = Mathf.Max(0f, endlessDescenderProbabilityIncreaseRate);
|
|
|
|
|
baseSpawnProbability = Mathf.Clamp01(baseSpawnProbability);
|
|
|
|
|
maxSpawnProbability = Mathf.Clamp01(maxSpawnProbability);
|
|
|
|
|
probabilityIncreaseRate = Mathf.Max(0f, probabilityIncreaseRate);
|
|
|
|
|
|
|
|
|
|
// Ensure max probability is at least base probability
|
|
|
|
|
if (endlessDescenderMaxSpawnProbability < endlessDescenderBaseSpawnProbability)
|
|
|
|
|
if (maxSpawnProbability < baseSpawnProbability)
|
|
|
|
|
{
|
|
|
|
|
endlessDescenderMaxSpawnProbability = endlessDescenderBaseSpawnProbability;
|
|
|
|
|
maxSpawnProbability = baseSpawnProbability;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Validate time values
|
|
|
|
|
endlessDescenderGuaranteedSpawnTime = Mathf.Max(0.1f, endlessDescenderGuaranteedSpawnTime);
|
|
|
|
|
endlessDescenderSpawnCooldown = Mathf.Max(0.1f, endlessDescenderSpawnCooldown);
|
|
|
|
|
endlessDescenderSpeedTransitionDuration = Mathf.Max(0.1f, endlessDescenderSpeedTransitionDuration);
|
|
|
|
|
endlessDescenderSurfacingSpawnDelay = Mathf.Max(0f, endlessDescenderSurfacingSpawnDelay);
|
|
|
|
|
guaranteedSpawnTime = Mathf.Max(0.1f, guaranteedSpawnTime);
|
|
|
|
|
spawnCooldown = Mathf.Max(0.1f, spawnCooldown);
|
|
|
|
|
speedTransitionDuration = Mathf.Max(0.1f, speedTransitionDuration);
|
|
|
|
|
surfacingSpawnDelay = Mathf.Max(0f, surfacingSpawnDelay);
|
|
|
|
|
|
|
|
|
|
// Validate scoring
|
|
|
|
|
endlessDescenderBasePoints = Mathf.Max(0, endlessDescenderBasePoints);
|
|
|
|
|
endlessDescenderDepthMultiplier = Mathf.Max(0, endlessDescenderDepthMultiplier);
|
|
|
|
|
basePoints = Mathf.Max(0, basePoints);
|
|
|
|
|
depthMultiplier = Mathf.Max(0, depthMultiplier);
|
|
|
|
|
|
|
|
|
|
// Validate tile generation
|
|
|
|
|
endlessDescenderInitialTileCount = Mathf.Max(1, endlessDescenderInitialTileCount);
|
|
|
|
|
endlessDescenderTileSpawnBuffer = Mathf.Max(0f, endlessDescenderTileSpawnBuffer);
|
|
|
|
|
endlessDescenderMoveSpeed = Mathf.Max(0.1f, endlessDescenderMoveSpeed);
|
|
|
|
|
endlessDescenderSpeedUpFactor = Mathf.Max(0f, endlessDescenderSpeedUpFactor);
|
|
|
|
|
endlessDescenderSpeedUpInterval = Mathf.Max(0.1f, endlessDescenderSpeedUpInterval);
|
|
|
|
|
endlessDescenderMaxMoveSpeed = Mathf.Max(endlessDescenderMoveSpeed, endlessDescenderMaxMoveSpeed);
|
|
|
|
|
endlessDescenderVelocityCalculationInterval = Mathf.Max(0.01f, endlessDescenderVelocityCalculationInterval);
|
|
|
|
|
initialTileCount = Mathf.Max(1, initialTileCount);
|
|
|
|
|
tileSpawnBuffer = Mathf.Max(0f, tileSpawnBuffer);
|
|
|
|
|
moveSpeed = Mathf.Max(0.1f, moveSpeed);
|
|
|
|
|
speedUpFactor = Mathf.Max(0f, speedUpFactor);
|
|
|
|
|
speedUpInterval = Mathf.Max(0.1f, speedUpInterval);
|
|
|
|
|
maxMoveSpeed = Mathf.Max(moveSpeed, maxMoveSpeed);
|
|
|
|
|
velocityCalculationInterval = Mathf.Max(0.01f, velocityCalculationInterval);
|
|
|
|
|
|
|
|
|
|
// Validate obstacle values
|
|
|
|
|
endlessDescenderObstacleSpawnInterval = Mathf.Max(0.1f, endlessDescenderObstacleSpawnInterval);
|
|
|
|
|
endlessDescenderObstacleSpawnIntervalVariation = Mathf.Max(0f, endlessDescenderObstacleSpawnIntervalVariation);
|
|
|
|
|
endlessDescenderObstacleMaxSpawnAttempts = Mathf.Max(1, endlessDescenderObstacleMaxSpawnAttempts);
|
|
|
|
|
endlessDescenderObstacleSpawnCollisionRadius = Mathf.Max(0.1f, endlessDescenderObstacleSpawnCollisionRadius);
|
|
|
|
|
endlessDescenderObstacleMinMoveSpeed = Mathf.Max(0.1f, endlessDescenderObstacleMinMoveSpeed);
|
|
|
|
|
endlessDescenderObstacleMaxMoveSpeed = Mathf.Max(endlessDescenderObstacleMinMoveSpeed, endlessDescenderObstacleMaxMoveSpeed);
|
|
|
|
|
obstacleSpawnInterval = Mathf.Max(0.1f, obstacleSpawnInterval);
|
|
|
|
|
obstacleSpawnIntervalVariation = Mathf.Max(0f, obstacleSpawnIntervalVariation);
|
|
|
|
|
obstacleMaxSpawnAttempts = Mathf.Max(1, obstacleMaxSpawnAttempts);
|
|
|
|
|
obstacleSpawnCollisionRadius = Mathf.Max(0.1f, obstacleSpawnCollisionRadius);
|
|
|
|
|
obstacleMinMoveSpeed = Mathf.Max(0.1f, obstacleMinMoveSpeed);
|
|
|
|
|
obstacleMaxMoveSpeed = Mathf.Max(obstacleMinMoveSpeed, obstacleMaxMoveSpeed);
|
|
|
|
|
|
|
|
|
|
// Validate collision settings
|
|
|
|
|
endlessDescenderDamageImmunityDuration = Mathf.Max(0.1f, endlessDescenderDamageImmunityDuration);
|
|
|
|
|
endlessDescenderBumpForce = Mathf.Max(0.1f, endlessDescenderBumpForce);
|
|
|
|
|
endlessDescenderSmoothMoveSpeed = Mathf.Max(0.1f, endlessDescenderSmoothMoveSpeed);
|
|
|
|
|
damageImmunityDuration = Mathf.Max(0.1f, damageImmunityDuration);
|
|
|
|
|
bumpForce = Mathf.Max(0.1f, bumpForce);
|
|
|
|
|
smoothMoveSpeed = Mathf.Max(0.1f, smoothMoveSpeed);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|