ItemFilter GetItemFilter(Vector2 location) { Collider2D collider = CustomRaycast.GetItemColliderAt(location); if (collider != null) { ItemFilter itemFilter = collider.GetComponent <ItemFilter>(); Assert.IsNotNull(itemFilter, "Found item without an item filter component."); return(itemFilter); } return(null); }
public bool IsItemOnGroundAt(Vector2 location) { Collider2D collider = CustomRaycast.GetItemColliderAt(location); return(collider != null && collider.GetComponent <ItemFilter>() != null); }