/// <inheritdoc /> protected override void OnStep() { if (Input.GetKeyDown(KeyCode.F)) { _joint2.EnableMotor(!_joint2.IsMotorEnabled()); _joint2.BodyB.IsAwake = true; } if (Input.GetKeyDown(KeyCode.M)) { _joint1.EnableMotor(!_joint1.IsMotorEnabled()); _joint1.BodyB.IsAwake = true; } }
/// <inheritdoc /> /// <inheritdoc /> public override void OnKeyDown(KeyboardKeyEventArgs key) { if (key.Key == Key.F) { _joint2.EnableMotor(!_joint2.IsMotorEnabled()); _joint2.BodyB.IsAwake = true; } if (key.Key == Key.M) { _joint1.EnableMotor(!_joint1.IsMotorEnabled()); _joint1.BodyB.IsAwake = true; } }
/// <inheritdoc /> /// <inheritdoc /> public override void OnKeyDown(KeyInputEventArgs keyInput) { if (keyInput.Key == KeyCodes.F) { _joint2.EnableMotor(!_joint2.IsMotorEnabled()); _joint2.BodyB.IsAwake = true; } if (keyInput.Key == KeyCodes.M) { _joint1.EnableMotor(!_joint1.IsMotorEnabled()); _joint1.BodyB.IsAwake = true; } }
/// <inheritdoc /> protected override void OnStep() { if (Input.GetKeyDown(KeyCode.L)) { m_joint.EnableLimit(!m_joint.IsLimitEnabled()); } if (Input.GetKeyDown(KeyCode.M)) { m_joint.EnableMotor(!m_joint.IsMotorEnabled()); } }
/// <inheritdoc /> /// <inheritdoc /> public override void OnKeyDown(KeyInputEventArgs keyInput) { if (keyInput.Key == KeyCodes.L) { m_joint.EnableLimit(!m_joint.IsLimitEnabled()); } if (keyInput.Key == KeyCodes.M) { m_joint.EnableMotor(!m_joint.IsMotorEnabled()); } }
/// <inheritdoc /> /// <inheritdoc /> public override void OnKeyDown(KeyboardKeyEventArgs key) { if (key.Key == Key.L) { m_joint.EnableLimit(!m_joint.IsLimitEnabled()); } if (key.Key == Key.M) { m_joint.EnableMotor(!m_joint.IsMotorEnabled()); } }
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); } }
/// <inheritdoc /> protected override void PreStep() { DrawString("Keys: (l) limits, (m) motor"); if (Input.GetKeyDown(KeyCode.L)) { m_joint.EnableLimit(!m_joint.IsLimitEnabled()); } if (Input.GetKeyDown(KeyCode.M)) { m_joint.EnableMotor(!m_joint.IsMotorEnabled()); } }
protected override void OnKeyDown(KeyEventArgs e) { if (e.KeyCode == Keys.A) { _motorJoint.SetMotorSpeed(-_motorSpeed); } if (e.KeyCode == Keys.S) { _motorJoint.SetMotorSpeed(0.0f); } if (e.KeyCode == Keys.D) { _motorJoint.SetMotorSpeed(_motorSpeed); } if (e.KeyCode == Keys.M) { _motorJoint.EnableMotor(!_motorJoint.IsMotorEnabled()); } }
/// <inheritdoc /> /// <inheritdoc /> public override void OnKeyDown(KeyInputEventArgs keyInput) { if (keyInput.Key == KeyCodes.A) { _motorJoint.SetMotorSpeed(-_motorSpeed); } if (keyInput.Key == KeyCodes.S) { _motorJoint.SetMotorSpeed(0.0f); } if (keyInput.Key == KeyCodes.D) { _motorJoint.SetMotorSpeed(_motorSpeed); } if (keyInput.Key == KeyCodes.M) { _motorJoint.EnableMotor(!_motorJoint.IsMotorEnabled()); } }
/// <inheritdoc /> protected override void OnStep() { if (Input.GetKeyDown(KeyCode.A)) { _motorJoint.SetMotorSpeed(-_motorSpeed); } if (Input.GetKeyDown(KeyCode.S)) { _motorJoint.SetMotorSpeed(0.0f); } if (Input.GetKeyDown(KeyCode.D)) { _motorJoint.SetMotorSpeed(_motorSpeed); } if (Input.GetKeyDown(KeyCode.M)) { _motorJoint.EnableMotor(!_motorJoint.IsMotorEnabled()); } }
/// <inheritdoc /> /// <inheritdoc /> public override void OnKeyDown(KeyboardKeyEventArgs key) { if (key.Key == Key.A) { _motorJoint.SetMotorSpeed(-_motorSpeed); } if (key.Key == Key.S) { _motorJoint.SetMotorSpeed(0.0f); } if (key.Key == Key.D) { _motorJoint.SetMotorSpeed(_motorSpeed); } if (key.Key == Key.M) { _motorJoint.EnableMotor(!_motorJoint.IsMotorEnabled()); } }
/// <inheritdoc /> protected override void PreUpdate() { if (Input.GetKeyDown(KeyCode.A)) { _motorJoint.SetMotorSpeed(-_motorSpeed); } if (Input.GetKeyDown(KeyCode.S)) { _motorJoint.SetMotorSpeed(0.0f); } if (Input.GetKeyDown(KeyCode.D)) { _motorJoint.SetMotorSpeed(_motorSpeed); } if (Input.GetKeyDown(KeyCode.M)) { _motorJoint.EnableMotor(!_motorJoint.IsMotorEnabled()); } DrawString("Keys: left = a, brake = s, right = d, toggle motor = m"); }