| | 1 | | using System; |
| | 2 | | using Newtonsoft.Json; |
| | 3 | | using Newtonsoft.Json.Converters; |
| | 4 | |
|
| | 5 | | [Serializable] |
| | 6 | | public class StaticAgentConfig { |
| | 7 | | public string name; |
| | 8 | | public string agentClass; |
| | 9 | | public float unitCost; |
| | 10 | |
|
| | 11 | | [Serializable] |
| | 12 | | public class AccelerationConfig { |
| 18 | 13 | | public float maxReferenceNormalAcceleration = 300f; |
| 18 | 14 | | public float referenceSpeed = 1000f; |
| 18 | 15 | | public float maxForwardAcceleration = 50f; |
| | 16 | | } |
| | 17 | |
|
| | 18 | | [Serializable] |
| | 19 | | public class BoostConfig { |
| 18 | 20 | | public float boostTime = 0.3f; |
| 18 | 21 | | public float boostAcceleration = 350f; |
| | 22 | | } |
| | 23 | |
|
| | 24 | | [Serializable] |
| | 25 | | public class LiftDragConfig { |
| 18 | 26 | | public float liftCoefficient = 0.2f; |
| 18 | 27 | | public float dragCoefficient = 0.7f; |
| 18 | 28 | | public float liftDragRatio = 5f; |
| | 29 | | } |
| | 30 | |
|
| | 31 | | [Serializable] |
| | 32 | | public class BodyConfig { |
| 18 | 33 | | public float mass = 0.37f; |
| 18 | 34 | | public float crossSectionalArea = 3e-4f; |
| 18 | 35 | | public float finArea = 6e-4f; |
| 18 | 36 | | public float bodyArea = 1e-2f; |
| | 37 | | } |
| | 38 | |
|
| | 39 | | [Serializable] |
| | 40 | | public class HitConfig { |
| 17 | 41 | | public float hitRadius = 1f; |
| 17 | 42 | | public float killProbability = 0.9f; |
| | 43 | | } |
| | 44 | |
|
| | 45 | | [Serializable] |
| | 46 | | public class PowerTable { |
| | 47 | | public float IDLE; |
| | 48 | | public float LOW; |
| | 49 | | public float CRUISE; |
| | 50 | | public float MIL; |
| | 51 | | public float MAX; |
| | 52 | | } |
| | 53 | |
|
| | 54 | | public AccelerationConfig accelerationConfig; |
| | 55 | | public BoostConfig boostConfig; |
| | 56 | | public LiftDragConfig liftDragConfig; |
| | 57 | | public BodyConfig bodyConfig; |
| | 58 | | public HitConfig hitConfig; |
| | 59 | | public PowerTable powerTable; |
| | 60 | | } |
| | 61 | |
|
| | 62 | | [JsonConverter(typeof(StringEnumConverter))] |
| | 63 | | public enum PowerSetting { IDLE, LOW, CRUISE, MIL, MAX } |