for some reason it dose not change direction when my actor reaches bottom of screen
public class GiantRobot extends Actor
{
// GLOBAL DECLARATIONS
// -------------------
int time=0;
int Xaxis=3;
int Yaxis=3;
// CONSTRUCTOR // runs one time only
// -----------
public GiantRobot()
{
} // end constructor
// ACT METHOD // runs repeatedly
// ----------
public void act()
{
setLocation(getX()+Xaxis,getY()+Yaxis);
if(getX()==599&&getY()==799)
{
setLocation(0,0);
}
if(getX()==599)
{
Xaxis=Xaxis*(-1);
}
else if(getX()==0)
{
Xaxis=Xaxis*(-1);
}
if(getY()==799)
{
Yaxis=Yaxis*(-1);
}
else if(getY()==0)
{
Yaxis=Yaxis*(-1);
}
} // end act
}//end class

