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