Пример #1
0
 void localTouch(InputTouch touch)
 {
     touchPos = touch.currentTouchPosition;
 }
Пример #2
0
 void localLongTouchEnd(InputTouch touch)
 {
     LongEndValue.text = "Fired - " + touch.currentTouchPosition;
     StartCoroutine(ClearLongTextTouchEnd(LongEndValue, .5f));
 }
Пример #3
0
 void localButtonQuickClickEnd(InputTouch button)
 {
     onQuickTouchEnd.Invoke();
 }
Пример #4
0
 void localButtonLongClick(InputTouch button)
 {
     onLongTouch.Invoke();
 }
Пример #5
0
        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;
        }
Пример #6
0
 void localSwipe(InputTouch button)
 {
     onSwipe.Invoke();
 }
Пример #7
0
 private void Start()
 {
     inputControl  = GameObject.Find("GameEngine").GetComponent <InputTouch>();
     startPosition = transform.position;
     Hide();
 }
Пример #8
0
 void localButtonClickEnd(InputTouch button)
 {
     onTouchEnd.Invoke(button);
 }
Пример #9
0
 void localTouchEnd(InputTouch touch)
 {
     touchEndValue.text = "Fired - " + touch.originalTouchPosition;
     StartCoroutine(ClearTextTouchEnd(touchEndValue, .5f));
 }
Пример #10
0
	void Awake(){
		Instance=this;
	}
Пример #11
0
 void localTouchStart(InputTouch touch)
 {
     touchStartValue.text = "Fired - " + touch.currentTouchPosition;
     StartCoroutine(ClearTextTouchStart(touchStartValue, .5f));
 }
Пример #12
0
 void localDoubleTouchEnd(InputTouch touch)
 {
     doubleEndValue.text = "Fired - " + touch.currentTouchPosition;
     StartCoroutine(ClearDoubleTextTouchEnd(doubleEndValue, .5f));
 }
Пример #13
0
 void localQuickTouchEnd(InputTouch touch)
 {
     quickEndValue.text = "Fired - " + touch.currentTouchPosition;
     StartCoroutine(ClearQuickTextTouchEnd(quickEndValue, .5f));
 }
Пример #14
0
 void localTouchEnd(InputTouch touch)
 {
     touchpad.currentTouchPosition = EasyInputConstants.NOT_TOUCHING;
     horizontalStepsFired          = 0;
     verticalStepsFired            = 0;
 }
Пример #15
0
 void localTouchEnd(InputTouch touch)
 {
     touchEndValue.text = "Fired";
     StartCoroutine(ClearTextTouchEnd(touchEndValue, .5f));
 }
Пример #16
0
 void localButtonClickStart(InputTouch button)
 {
     onTouchStart.Invoke(button);
 }
Пример #17
0
 void localLongTouchEnd(InputTouch touch)
 {
     LongEndValue.text = "Fired";
     StartCoroutine(ClearLongTextTouchEnd(LongEndValue, .5f));
 }
Пример #18
0
 void localAxisEnd(InputTouch touch)
 {
     //we just ended a touch so reset the last frame
     lastFrameTouch = EasyInputConstants.NOT_TOUCHING;
 }
Пример #19
0
 void localLongTouch(InputTouch touch)
 {
     longTouching = true;
 }
Пример #20
0
 void localButtonLongClickEnd(InputTouch button)
 {
     onLongTouchEnd.Invoke();
 }
Пример #21
0
 void localQuickTouchEnd(InputTouch touch)
 {
     quickEndValue.text = "Fired";
     StartCoroutine(ClearQuickTextTouchEnd(quickEndValue, .5f));
 }
Пример #22
0
 void localButtonClick(InputTouch button)
 {
     onTouch.Invoke();
 }
Пример #23
0
 void localDoubleTouchEnd(InputTouch touch)
 {
     doubleEndValue.text = "Fired";
     StartCoroutine(ClearDoubleTextTouchEnd(doubleEndValue, .5f));
 }
Пример #24
0
 void localButtonDoubleClickEnd(InputTouch button)
 {
     onDoubleTouchEnd.Invoke();
 }
Пример #25
0
 void localSwipe(InputTouch touch)
 {
     swipeValue.text = "Fired";
     StartCoroutine(ClearSwipeTextTouchEnd(swipeValue, .5f));
 }
Пример #26
0
 void localButtonLongClickStart(InputTouch button)
 {
     onLongTouchStart.Invoke();
 }
Пример #27
0
 void localTouch(InputTouch touch)
 {
     touchpad = touch;
 }
Пример #28
0
 void localTouchEnd(InputTouch touch)
 {
     touchPos = EasyInputConstants.NOT_TOUCHING;
 }
Пример #29
0
 void localTouch(InputTouch touch)
 {
     touching = true;
 }