Exemplo n.º 1
0
        void OnPointerDown()
        {
            if (Enabled && questionLivingLetter != null)
            {
                var pointerPosition = game.Context.GetInputManager().LastPointerPosition;
                var screenRay       = game.tubesCamera.ScreenPointToRay(pointerPosition);

                RaycastHit hitInfo;
                if (questionLivingLetter.GetComponent <Collider>().Raycast(screenRay, out hitInfo, game.tubesCamera.farClipPlane))
                {
                    if (playerInputPointerUp != null)
                    {
                        playerInputPointerUp(false);
                    }

                    draggingLetter = questionLivingLetter;
                    questionLivingLetter.OnPointerDown(pointerPosition);
                }
            }
        }