2025-12-04 08:52:59 +01:00
|
|
|
using System;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace Minigames.FortFight.Data
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Configuration data for AI difficulty levels.
|
|
|
|
|
/// Defines how accurate and fast the AI behaves at each difficulty tier.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Serializable]
|
|
|
|
|
public struct AIDifficultyData
|
|
|
|
|
{
|
|
|
|
|
[Tooltip("Angle deviation in degrees (±)")]
|
|
|
|
|
public float angleDeviation;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Force/speed deviation as percentage (0.2 = ±20%)")]
|
|
|
|
|
public float forceDeviation;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Minimum thinking time in seconds")]
|
|
|
|
|
public float thinkTimeMin;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Maximum thinking time in seconds")]
|
|
|
|
|
public float thinkTimeMax;
|
|
|
|
|
|
2025-12-16 19:51:14 +01:00
|
|
|
[Header("TrashBag Detonation")]
|
|
|
|
|
[Tooltip("Minimum detonation distance from target (0-1, normalized along trajectory)")]
|
|
|
|
|
public float trashBagDetonationDistanceMin;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Maximum detonation distance from target (0-1, normalized along trajectory)")]
|
|
|
|
|
public float trashBagDetonationDistanceMax;
|
|
|
|
|
|
2025-12-04 08:52:59 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Create AI difficulty data with specified parameters
|
|
|
|
|
/// </summary>
|
2025-12-16 19:51:14 +01:00
|
|
|
public AIDifficultyData(float angleDeviation, float forceDeviation, float thinkTimeMin, float thinkTimeMax,
|
|
|
|
|
float trashBagDetonationDistanceMin = 0.2f, float trashBagDetonationDistanceMax = 0.4f)
|
2025-12-04 08:52:59 +01:00
|
|
|
{
|
|
|
|
|
this.angleDeviation = angleDeviation;
|
|
|
|
|
this.forceDeviation = forceDeviation;
|
|
|
|
|
this.thinkTimeMin = thinkTimeMin;
|
|
|
|
|
this.thinkTimeMax = thinkTimeMax;
|
2025-12-16 19:51:14 +01:00
|
|
|
this.trashBagDetonationDistanceMin = trashBagDetonationDistanceMin;
|
|
|
|
|
this.trashBagDetonationDistanceMax = trashBagDetonationDistanceMax;
|
2025-12-04 08:52:59 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Wrapper class to serialize AI difficulty configuration in Unity inspector.
|
|
|
|
|
/// Maps difficulty level to its configuration data.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Serializable]
|
|
|
|
|
public class AIDifficultyConfig
|
|
|
|
|
{
|
|
|
|
|
[Tooltip("Difficulty level")]
|
|
|
|
|
public AIDifficulty difficulty;
|
|
|
|
|
|
|
|
|
|
[Tooltip("Configuration data for this difficulty")]
|
|
|
|
|
public AIDifficultyData data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|