So I'm working on Asteroids, and I have looked up how to do the proton wave checkCollision method and I have it typed exactly as it has shown but its not working.
That's the code, here is the error:
incompatible types: java.lang.Object cannot be converted to Asteroid
private void checkCollision()
{
int range = getImage().getWidth()/2;
List asteroids = getObjectsInRange(range, Asteroid.class);
for (Asteroid a : asteroids)
{
a.hit (DAMAGE);
}
}

