Example #1
0
    void Start()
    {
        _currentState = VirtualPadState.OBJECT_MANIP;
        if (gameCameraObject)
        {
            gameCamera = gameCameraObject.GetComponent <Camera>();
        }

        if (gazePointObject)
        {
            gazePoint = gazePointObject.GetComponent <Transform>();
        }
        if (eventListenerObject)
        {
            eventTouchListener = eventListenerObject.GetComponent <TabletTouchEventManager>();
        }
        pointerReceivedCallback   = this.pointerReceivedHandler;
        gestureRecognizedCallback = this.gestureRecognizedHandler;
        if (eventTouchListener != null)
        {
            eventTouchListener.SetTouchReceivedEventListener(pointerReceivedCallback);
            eventTouchListener.SetGestureRecognizedListener(gestureRecognizedCallback);
        }


        boardObjectBound = boardObject.GetComponent <Collider>().bounds;
        fingers          = new GameObject[] { finger1, finger2, finger3, finger4, finger5 };
        for (int i = 0; i < fingers.Length; i++)
        {
            fingers[i].SetActive(false);
        }

        padTranslationByPointers.CriticData = new Vector2(0, 0);
        padScaleByPointers.CriticData       = new Vector2(0, 0);


        setMenuActiveness(false);
    }
Example #2
0
 public void SetTouchReceivedEventListener(PointerReceivedEventCallback touchEventListener)
 {
     pointerReceivedListener += touchEventListener;
 }