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);
}
}

Leave a Reply