Physics
This commit is contained in:
@ -32,6 +32,7 @@ namespace DroneSimulator
|
||||
checkBox_Area_Freeze_CheckedChanged(null, null);
|
||||
numericUpDown_Area_Wind_Update(null, null);
|
||||
numericUpDown_GPS_ValueChanged(null, null);
|
||||
numericUpDown_Physics_ValueChanged(null, null);
|
||||
}
|
||||
|
||||
private void ClientConnectionCallback(object o)
|
||||
@ -46,7 +47,7 @@ namespace DroneSimulator
|
||||
if (data.Connect)
|
||||
{
|
||||
Drone drone = new Drone(data.ID);
|
||||
drone.Create(1.0f, 0.5f, 1.0f);
|
||||
drone.Create();
|
||||
|
||||
screen2D.CreateDrone(Color.Red, data.ID);
|
||||
|
||||
@ -178,7 +179,7 @@ namespace DroneSimulator
|
||||
|
||||
Invoke((MethodInvoker)delegate
|
||||
{
|
||||
label_Clients_Num.Text = data.Count.ToString();
|
||||
label_Visual_Num.Text = data.Count.ToString();
|
||||
});
|
||||
|
||||
if (data.Connect)
|
||||
@ -344,5 +345,12 @@ namespace DroneSimulator
|
||||
GPS.State.Vdop = (float)numericUpDown_GPS_VDOP.Value;
|
||||
GPS.State.Pdop = (float)numericUpDown_GPS_PDOP.Value;
|
||||
}
|
||||
|
||||
private void numericUpDown_Physics_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
Drone.Physics.Mass = (float)numericUpDown_Physics_Mass.Value;
|
||||
Drone.Physics.Length = (float)numericUpDown_Physics_Length.Value;
|
||||
Drone.Physics.MaxPower = (float)numericUpDown_Physics_Power.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user