void StopRotation() { if (currentRotationalState != RotationalMotionState.NONE) { webView.Eval("wsSendCommand ('command', 'walkTurnZ 100');"); } currentRotationalState = RotationalMotionState.NONE; }
void RotateLeft() { if (currentRotationalState == RotationalMotionState.LEFT) { return; } if (currentRotationalState == RotationalMotionState.RIGHT) { StopRotation(); } webView.Eval("wsSendCommand ('command', 'walkTurnZ 130');"); currentRotationalState = RotationalMotionState.LEFT; }