I have this code
It is inside a method inside a class called "Shot" Inside another class "Asteroid1" I have the method CreateExplosion:
When I compile, I am told that "non-static method createExplosion" cannot be refferred to from a static context. What is wrong with my code? thanks.
if(getWorld() != null)
{
if(canSee(Asteroid1.class))
{
if(Asteroid1.class != null)
{
Asteroid1.createExplosion();
score = score+5;
destroyMultiple(Asteroid1.class);
createAsteroid1();
}
}
} public void createExplosion()
{
Explosion newExplosion = new Explosion();
int x = getX();
int y = getY();
world.addObject(newExplosion, x, y);
}


