void localTouch(InputTouch touch) { touchPos = touch.currentTouchPosition; }
void localLongTouchEnd(InputTouch touch) { LongEndValue.text = "Fired - " + touch.currentTouchPosition; StartCoroutine(ClearLongTextTouchEnd(LongEndValue, .5f)); }
void localButtonQuickClickEnd(InputTouch button) { onQuickTouchEnd.Invoke(); }
void localButtonLongClick(InputTouch button) { onLongTouch.Invoke(); }
void localAxis(InputTouch touch) { //check to see if we want to effect anything if (preventControl) { return; } //first check to see if this is the first frame if (lastFrameTouch == EasyInputConstants.NOT_TOUCHING) { lastFrameTouch = touch.currentTouchPosition; return; } //otherwise is a continuation horizontal = (touch.currentTouchPosition.x - lastFrameTouch.x) * sensitivity * Time.deltaTime * 100f; vertical = (touch.currentTouchPosition.y - lastFrameTouch.y) * sensitivity * Time.deltaTime * 100f; actionVector3 = EasyInputUtilities.getControllerVector3(horizontal, vertical, axisHorizontal, axisVertical); switch (action) { case EasyInputConstants.ACTION_TYPE.Position: transform.position += actionVector3; break; case EasyInputConstants.ACTION_TYPE.Rotation: transform.Rotate(actionVector3, Space.World); break; case EasyInputConstants.ACTION_TYPE.LocalPosition: transform.Translate(actionVector3); break; case EasyInputConstants.ACTION_TYPE.LocalRotation: transform.Rotate(actionVector3); break; case EasyInputConstants.ACTION_TYPE.LocalScale: transform.localScale += actionVector3; break; default: Debug.Log("Invalid Action"); break; } //bowling ball lane range temp = transform.position; if (transform.position.x > laneRange) { temp.x = laneRange; } else if (transform.position.x < -laneRange) { temp.x = -laneRange; } transform.position = temp; //move the camera to follow temp.x = transform.position.x; temp.y = 3.06f; temp.z = -6f; followingCamera.transform.position = temp; //also move the aim arrow temp = aimArrow.position; temp.x = transform.position.x; aimArrow.position = temp; lastFrameTouch = touch.currentTouchPosition; }
void localSwipe(InputTouch button) { onSwipe.Invoke(); }
private void Start() { inputControl = GameObject.Find("GameEngine").GetComponent <InputTouch>(); startPosition = transform.position; Hide(); }
void localButtonClickEnd(InputTouch button) { onTouchEnd.Invoke(button); }
void localTouchEnd(InputTouch touch) { touchEndValue.text = "Fired - " + touch.originalTouchPosition; StartCoroutine(ClearTextTouchEnd(touchEndValue, .5f)); }
void Awake(){ Instance=this; }
void localTouchStart(InputTouch touch) { touchStartValue.text = "Fired - " + touch.currentTouchPosition; StartCoroutine(ClearTextTouchStart(touchStartValue, .5f)); }
void localDoubleTouchEnd(InputTouch touch) { doubleEndValue.text = "Fired - " + touch.currentTouchPosition; StartCoroutine(ClearDoubleTextTouchEnd(doubleEndValue, .5f)); }
void localQuickTouchEnd(InputTouch touch) { quickEndValue.text = "Fired - " + touch.currentTouchPosition; StartCoroutine(ClearQuickTextTouchEnd(quickEndValue, .5f)); }
void localTouchEnd(InputTouch touch) { touchpad.currentTouchPosition = EasyInputConstants.NOT_TOUCHING; horizontalStepsFired = 0; verticalStepsFired = 0; }
void localTouchEnd(InputTouch touch) { touchEndValue.text = "Fired"; StartCoroutine(ClearTextTouchEnd(touchEndValue, .5f)); }
void localButtonClickStart(InputTouch button) { onTouchStart.Invoke(button); }
void localLongTouchEnd(InputTouch touch) { LongEndValue.text = "Fired"; StartCoroutine(ClearLongTextTouchEnd(LongEndValue, .5f)); }
void localAxisEnd(InputTouch touch) { //we just ended a touch so reset the last frame lastFrameTouch = EasyInputConstants.NOT_TOUCHING; }
void localLongTouch(InputTouch touch) { longTouching = true; }
void localButtonLongClickEnd(InputTouch button) { onLongTouchEnd.Invoke(); }
void localQuickTouchEnd(InputTouch touch) { quickEndValue.text = "Fired"; StartCoroutine(ClearQuickTextTouchEnd(quickEndValue, .5f)); }
void localButtonClick(InputTouch button) { onTouch.Invoke(); }
void localDoubleTouchEnd(InputTouch touch) { doubleEndValue.text = "Fired"; StartCoroutine(ClearDoubleTextTouchEnd(doubleEndValue, .5f)); }
void localButtonDoubleClickEnd(InputTouch button) { onDoubleTouchEnd.Invoke(); }
void localSwipe(InputTouch touch) { swipeValue.text = "Fired"; StartCoroutine(ClearSwipeTextTouchEnd(swipeValue, .5f)); }
void localButtonLongClickStart(InputTouch button) { onLongTouchStart.Invoke(); }
void localTouch(InputTouch touch) { touchpad = touch; }
void localTouchEnd(InputTouch touch) { touchPos = EasyInputConstants.NOT_TOUCHING; }
void localTouch(InputTouch touch) { touching = true; }