forked from shenzhou05/ASW
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AswData.cs
247 lines (215 loc) · 5.87 KB
/
AswData.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
using System;
using UnityEngine;
namespace AntiSubmarineWeapon
{
public class AswData
{
private string _type;
public string Type
{
get
{
return _type;
}
set
{
if (value == "Torpedo" || value == "DepthCharge" || value == "DepthChargeProjector" ||
value == "Sonora")
{
_type = value;
}
}
}
private float _maxDetonateDepth;
public float MaxDetonateDepth
{
get
{
return _maxDetonateDepth;
}
set
{
if (value >= 0)
_maxDetonateDepth = value;
}
}
private float _maxDepth;
public float MaxDepth
{
get { return _maxDepth; }
set
{
if (value >= 0)
_maxDepth = value;
}
}
private int _errorRange;
public int ErrorRange
{
get { return _errorRange; }
set { _errorRange = value >= 0 ? value : 5; }
}
public bool VolumeBuoyancy { get; set; }
private float _volume;
public float Volume
{
get { return _volume; }
set
{
if (value >= 0 || value == -1)
_volume = value;
}
}
private float _buoyancyForce;
public float BuoyancyForce
{
get { return _buoyancyForce; }
set
{
if (value >= 0 || value == -1)
_buoyancyForce = value;
}
}
public Vector3 AirMaxTorque { get; set; }
public Vector3 WaterMaxTorque { get; set; }
public Vector3 AirCocf { get; set; }
public Vector3 WaterCocf { get; set; }
public bool AutoReload { get; set; }
private float _reloadTime;
public float ReloadTime
{
get { return _reloadTime; }
set
{
_reloadTime = Math.Abs(value);
}
}
private float _ejectForce;
public float Ejectforce
{
get { return _ejectForce; }
set
{
_ejectForce = Math.Abs(value);
}
}
public bool ZeroThrustSink { get; set; }
private float _cruiseDepth;
public float CruiseDepth
{
get { return _cruiseDepth; }
set
{
_cruiseDepth = -Math.Abs(value);
}
}
private string _guideType;
public string GuideType
{
get { return _guideType; }
set
{
if (value == "ActiveL" || value == "PassiveL" || value == "Inertial")
_guideType = value;
else
_guideType = "Inertial";
}
}
public Vector3 MaxTorque { get; set; }
public Vector3 MaxRotate { get; set; }
public Vector3 PidAngleInfo { get; set; }
public Vector3 PidTorqueInfo { get; set; }
private float _accuracy;
public float Accuracy
{
get { return _accuracy; }
set
{
_accuracy = Math.Abs(value);
}
}
private float _agor;
public float Agor
{
get { return _agor; }
set
{
_agor = Math.Abs(value);
}
}
private float _ador;
public float Ador
{
get { return _ador; }
set
{
_ador = Math.Abs(value);
}
}
public Vector3 VelocityFeature { get; set; }
private string _sonoraType;
public string SonoraType
{
get { return _sonoraType; }
set
{
if (value == "CS" || value == "FS" || value == "TS")
_sonoraType = value;
}
}
private float _passivePerformance;
public float PassivePerformance
{
get { return _passivePerformance; }
set
{
_passivePerformance = Math.Abs(value);
}
}
private float _activePerformance;
public float ActivePerformance
{
get { return _activePerformance; }
set
{
_activePerformance = Math.Abs(value);
}
}
private float _referenceNoise;
public float ReferenceNoise
{
get { return _referenceNoise; }
set
{
_referenceNoise = Math.Abs(value);
}
}
private float _pMaximumRecognition;
public float PMaximumRecognition
{
get { return _pMaximumRecognition; }
set
{
_pMaximumRecognition = Math.Abs(value);
}
}
private float _aMaximumRecognition;
public float AMaximumRecognition
{
get { return _aMaximumRecognition; }
set
{
_aMaximumRecognition = Math.Abs(value);
}
}
private float _recognitionAccuracy;
public float RecognitionAccuracy
{
get { return _recognitionAccuracy; }
set
{
_recognitionAccuracy = Math.Abs(value);
}
}
}
}