can anyone help me with this? first of all,it says it cannot find spriteWidth. and finally it says it connote find 'stopByRightWall'.
public boolean checkRightWalls()
{
int spriteHeight= getImage().getWidth();
int xDistance= (int)(spriteHeight/2);
Actor rightWall = getOneObjectAtOffset(xDistance, 0, Platform.class);
if(rightWall == null)
{
return false;
}
else
{
stopByRightWall (rightWall);
return true;
}
}
public void stopByRightWorld(Actor rightWall)
{
int wallWidth = rightWall.getImage().getWidth();
int newX = rightWall.getX() -(wallWidth + getImage(). getWidth())/2;
setLocation(newX- 5,getY());
}