You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
803 B
34 lines
803 B
|
3 months ago
|
|
||
|
|
public struct SingleVirbator
|
||
|
|
{
|
||
|
|
public int ActiveCommand;
|
||
|
|
public int Duration;
|
||
|
|
public int Amplitude;
|
||
|
|
|
||
|
|
public SingleVirbator(int command = 1, int duration = 0, int amplitude = 4)
|
||
|
|
{
|
||
|
|
command = command < 1 ? 1 : command > 3 ? 3 : command;
|
||
|
|
duration = duration < 0 ? 0 : duration;
|
||
|
|
amplitude = amplitude < 4 ? 4 : amplitude > 10 ? 10 : amplitude;
|
||
|
|
|
||
|
|
ActiveCommand = command;
|
||
|
|
Duration = duration;
|
||
|
|
Amplitude = amplitude;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public class VibrationData
|
||
|
|
{
|
||
|
|
public SingleVirbator[] Virbators = new SingleVirbator[2];
|
||
|
|
|
||
|
|
public VibrationData(SingleVirbator[] virbators)
|
||
|
|
{
|
||
|
|
if (virbators.Length != 2) return;
|
||
|
|
|
||
|
|
for (int i = 0; i < virbators.Length; i++)
|
||
|
|
{
|
||
|
|
Virbators[i] = virbators[i];
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|