Ejemplo n.º 1
0
    private IEnumerator Click(int mouseIndex, IClickable curr)
    {
        yield return(null);

        float doubleClickTimer = 0f;

        while (doubleClickTimer < doubleClickTime)
        {
            if (Input.GetMouseButtonDown(0) && curr == current)
            {
                curr.OnLeftDoubleClick();
                clickCo = null;
                yield break;
            }

            doubleClickTimer += Time.deltaTime;

            yield return(null);
        }

        curr.OnLeftClick();
        clickCo = null;
    }