예제 #1
0
        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);
        }
예제 #2
0
        public bool IsItemOnGroundAt(Vector2 location)
        {
            Collider2D collider = CustomRaycast.GetItemColliderAt(location);

            return(collider != null && collider.GetComponent <ItemFilter>() != null);
        }