コード例 #1
0
    public void EndThrow()
    {
        if (isHolding)
        {
            if (directionFloatY > 0)
            {
                heldObject.OnThrownUpwards(this);
            }
            else
            {
                if (directionFloatY < 0)
                {
                    heldObject.OnReleased(this);
                }
                else
                {
                    heldObject.OnThrown(this);
                }
            }

            heldObject = null;
            isHolding  = false;
            state      = PlayerState.Free;
        }
    }