hi
my class "Projektil Gelb" a bullet should disappear on the left side of the screen (world 101,101,6)
could any one help my
why this doesn't´t work ?
HERE IS THE CODE:
public class ProjektilGelb extends Actor
{
/**
* Act - do whatever the ProjektilGelb wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()//ProjektilGelb tut was auch immer in der "act" Methode drin steht
{
moveEast();//bewegt sich nach Osten (rechts)
}
public void AtWorldEdge()
{
if (atWorldEdge())
{
getWorld().removeObject(this);
}
}
public boolean atWorldEdge()
{
if(getX() < 101 || getX() > getWorld().getWidth() - 101)
return true;
else {
return false;
}
}
public void moveEast()//bewegung von ProjektilGelb wird deffiniert
{
setLocation(getX()+1,getY());
}
}
