public void CCTwist() { if (!selected) { } else { activeObject.CCTwist(); } }
// testInput: Tests the inputs and calls the appropriate command for the controllable to process. // controllable is the selection method's game object. have it accept the quaternion and angles, as well as // swipes/gestures/etc. public void testInput() { anObject = aControllableObject; IControllable controllable = (IControllable)anObject.GetComponent(typeof(IControllable)); controllable.GetIMUVals(quat, imuAngles); int twistDirection = testTwist(); if (twistDirection == 2) { controllable.CTwist(); } if (twistDirection == 1) { controllable.CCTwist(); } if (inputBools[(int)inputs.DOUBLE_CLICK]) { phidgetsIMU.GetComponent <PhidgetsIMU>().SetBaseline(); controllable.DoubleClick(); } if (inputBools[(int)inputs.CLICK]) { controllable.SingleClick(); } if (inputBools[(int)inputs.DOWN]) { controllable.SwipeDown(); } if (inputBools[(int)inputs.LEFT]) { controllable.SwipeLeft(); } if (inputBools[(int)inputs.RIGHT]) { controllable.SwipeRight(); } if (inputBools[(int)inputs.UP]) { controllable.SwipeUp(); } inputHandler.GetComponent <InputHandlerScript>().reset(); // Done with current inputs, flush them. }