示例#1
0
    // Update is called once per frame
    void Update()
    {
        if (!isFly)
        {
            if (Input.GetMouseButtonDown(0))
            {
                mousePos = Camera.main.ScreenToWorldPoint(new Vector2(Input.mousePosition.x, Input.mousePosition.y));
                Ray2D ray = new Ray2D(mousePos, Vector2.zero);
                hit = Physics2D.Raycast(ray.origin, ray.direction);

                if (hit != false)
                {
                    if (hit.collider.tag == "hopae" && isGame)
                    {
                        Debug.Log("hopae");
                        isMStart = true;
                        zoomCon.ZoomIn();
                    }
                }
            }
            if (Input.GetMouseButtonDown(1))
            {
                isTalk = false;
            }
        }
    }