throwNow()

private void throwNow()
    {
        GameObject throwThis = Instantiate(inventory.usingThis.GetPrefab(), LaunchOffset.position, transform.rotation);
        if (throwThis.gameObject.TryGetComponent(out ThrowItem throwThisItem))
        {
            throwThisItem.touchPos = shootHere;
            inventory.RemoveItem(inventory.usingThis);
        }
        else
        {
            Destroy(throwThis);
        }
    }


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *