/// <summary>
    /// Throws the grabbed item.
    /// </summary>
    /// <param name="dir">direction of throw</param>
    protected virtual void throwItem()
    {
        if (grabbedItem != null)
        {
            grabbedItem.transform.parent = null;
            grabbedItem.getRigidBody().isKinematic = false;
            grabbedItem.setIsPicked(false);
            grabbedItem.setIsUsed(true);
            grabbedItem.GetComponent <ThrowableItem>().onThrow();

            float throwForce;
            if (chargeAmount > 0)
            {
                throwForce   = grabbedItem.getVelocity() + (chargeAmount * maxThrowForce / 2);
                chargeAmount = 0;
            }
            else
            {
                throwForce = grabbedItem.getVelocity();
            }

            switch (throwDirection)
            {
            case Utilities.direction.Up: grabbedItem.getRigidBody().AddForce(new Vector2(0, throwForce), ForceMode2D.Impulse); break;

            case Utilities.direction.Down: grabbedItem.getRigidBody().AddForce(new Vector2(0, -throwForce), ForceMode2D.Impulse); break;

            case Utilities.direction.Left: grabbedItem.getRigidBody().AddForce(new Vector2(-throwForce, 0), ForceMode2D.Impulse); break;

            case Utilities.direction.Right: grabbedItem.getRigidBody().AddForce(new Vector2(throwForce, 0), ForceMode2D.Impulse); break;

            case Utilities.direction.UpLeft: grabbedItem.getRigidBody().AddForce(new Vector2(-throwForce, throwForce), ForceMode2D.Impulse); break;

            case Utilities.direction.UpRight: grabbedItem.getRigidBody().AddForce(new Vector2(throwForce, throwForce), ForceMode2D.Impulse); break;

            case Utilities.direction.DownLeft: grabbedItem.getRigidBody().AddForce(new Vector2(-throwForce, -throwForce), ForceMode2D.Impulse); break;

            case Utilities.direction.DownRight: grabbedItem.getRigidBody().AddForce(new Vector2(throwForce, -throwForce), ForceMode2D.Impulse); break;
            }
            grabbedItem.GetComponent <ThrowableItem>().setDirection(throwDirection);
            grabbedItem = null;
            hasItem     = false;
        }
        if (isGrounded)
        {
            state = Utilities.state.Idle;
        }
        else
        {
            state = Utilities.state.Air;
        }
    }