コード例 #1
0
    void OnMouseOver()
    {
        if (Time.timeScale != 0)
        {
            if (Input.GetMouseButtonDown(1))
            {
                grapple.Pull(gameObject);
                grappled       = true;
                countdownBegun = true;
            }

            if (Input.GetMouseButtonDown(0))
            {
                grapple.Swing(gameObject);
                grappled       = true;
                countdownBegun = true;
            }

            GetComponent <SpriteRenderer>().color = new Color(0, 1, 0);
        }
    }