How would i take the getX() of one object and apply it to another object?
Also how would i add an object to the world after a condition has been met?
public void checkTarget()
{
if(Greenfoot.isKeyDown("z"))
{
getWorld().addObject (new laser(),300, 165);
}public void checkTarget()
{
if(Greenfoot.isKeyDown("z"))
{
getWorld().addObject (new laser(),300, 165);
}