I want to use this code to check if the player is touching an object. The problem is that i am going to have so many objects that creating a new method like this for ever object would be inefficient. I was thinking maybe i could use getObjectsInRange in place of the fence.class but i'm not sure how to implement this. If this doesn't work i am open to any to any suggestions. Thanks
public boolean bottomTouching()
{
Actor fenceCheck = getOneObjectAtOffset(0, getImage().getHeight()/2-20, fence.class);
return fenceCheck != null;
}
