コード例 #1
0
ファイル: SliderCrank.cs プロジェクト: CrazyLiu00/GMap
 protected override void OnKeyDown(KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F)
     {
         _joint2.EnableMotor(!_joint2.IsMotorEnabled());
         _joint2.GetBodyB().SetAwake(true);
     }
     if (e.KeyCode == Keys.M)
     {
         _joint1.EnableMotor(!_joint1.IsMotorEnabled());
         _joint1.GetBodyB().SetAwake(true);
     }
 }