I'm working on a project for my school, and I am almost done but I need my enemies to move from one side to the other. Any help is appreciated. Thanks!
/**
* One of the enemies for Hunter, but doesn't shoot at Hunter because Enemy4 shoots a lot
* quicker and more bullets than Hunter.
*/
public void act()
{
Actor bullet = getOneIntersectingObject(Bullet.class);
move();
if (bullet !=null)
{
getWorld().removeObject(this);
}
}
public void shoot()
{
getWorld().addObject(new Bullet2(), getX(), getY());
}
public void move()
{
if (isAtEdge())
{
setLocation(getX()-STEP_SIZE,getY());
} else {
setLocation(getX()+STEP_SIZE,getY());
}
}

