// Throw item public void ThrowItem() { // Only activates when item is being held if (heldItem != null) { ConvertTagtoNum(); heldItem = null; itemDisplay.DisableImage(); GameObject thrownItem = Instantiate(fruits[tagIndex], transform.position + new Vector3(0, 1), Quaternion.identity) as GameObject; thrownItem.GetComponent <Rigidbody2D>().velocity = thrownItem.transform.up * throwForce; thrownItem.GetComponent <ItemParameters>().SetHeldStatus(true); } }