I have a enemy in my scenario and I want it to move left and right in one area so here is what I have:
But the enemy (polymetheus) will stand still because essentially I am telling it to move right the move left to it's original position and it executes this so fast you can't see it so I need some sort of delay after the first setLocation method but I don't want to delay the whole scenario, just polymetheus.class. How do I do this?
public void move() { speed = 4; setLocation ( getX() + speed, getY() ); setLocation (getX() - speed, getY() ); }