コード例 #1
0
    IEnumerator MouseUpEvent(System.Action action, float threshold)
    {
        var count = 0f;

        while (count < threshold)
        {
            if (Input.GetMouseButtonUp(0))
            {
                if (action.IsNotNull())
                {
                    action.Invoke();
                }
                yield break;
            }
            count += Time.deltaTime;
            yield return(null);
        }
    }