Im making a game where you slide around and need to be stopped by sertain objects. I used this line of code but it made it so i can only walk through this type of object. how can i change it so i can not walk through "VastObject"?
if ("up".equals(key))
{
if (getOneObjectAtOffset(0,-1,VastObject.class) != null)
setLocation(x,y-1);
}