Hello, I have created an object, which is suppoosed to travel to the edge of the map, after which it would disappear. The way of doing this that I tried was to check if the coordinates of the object pass the edges of the map, and if so the object would be deleted. I am using the getY and getX methods, but the computer returns the error: "cannot find symbol variable projectile". Is there a better way to do this, or how can I fix the above problem, oh here's the code:
public void act()
{
move(10);
if (projectile.getX > 400 || projectile.getY < 0)
{
getWorld().removeObject(this);
}
}

