Example #1
0
    void Update()
    {
        if (CameraControll.GetIsEventTime())
        {
            rb.velocity = new Vector3();
            return;
        }

        if (Application.isEditor)
        {
            if (Input.GetMouseButtonDown(0))
            {
                Vector3 mousePos = Input.mousePosition;
                sendTapedGroundPos(mousePos);
            }
        }
        else
        {
            if (Input.touchCount > 0)
            {
                Touch[] touches  = Input.touches;
                Vector3 touchPos = touches[0].position;
                sendTapedGroundPos(touchPos);
            }
        }

        move();
    }