Thats true, haha. I tried doing something like that but if i do setLocation shouldnt that be in my mainShip actor class? I used my enemyLaser to decrement the health, so how should i go about this?
it looks like this:
//BadLaser class//
public void destroy()
{
spaceShip ship = (spaceShip) getOneIntersectingObject(spaceShip.class);
ImageStrip strip = (ImageStrip) getOneIntersectingObject(ImageStrip.class);
GreenfootSound explodeAlien = new GreenfootSound("Explode.wav");
explodeAlien.setVolume(75);
World newWorld = null;
if(ship != null)
{
unlock = true;
explodeAlien.play();
getWorld().removeObject(ship);
getWorld().addObject(ship,311,500);
getWorld().removeObject(this);
lives.adjustValue(-1);
if(lives.getValue()<0)
{
newWorld = new GameOver();
Greenfoot.setWorld(newWorld);
}
}
}