I'm working on a collision-checking method for a Player actor. The actor uses this:
...in order to get an Obstacle. Maybe my error is here, and I should be using a list or something. I dunno. Assuming the error isn't here, then later in the method, I need to know specifically what sub-class of Obstacle "up" is. This statment:
...doesn't work because it says Obstacle and Rock.class are incomparable. But shouldn't I be able to ask "up" if it a certain sub-class of Obstacle?
Hope someone can help.
Obstacle up = (Obstacle)getOneObjectAtOffset(0, 10, Obstacle.class);
if(up == Rock.class || up == Spikes.class)

