Hey everybody,
we want to throw an object but it should only fly when we press the button and when you hold it it should only be thrown once.
Here is our code:
We are from germany:
Werfen = throw
Ball = ball
Thanks
public void werfen(){
String key = Greenfoot.getKey();
if("q".equals(key)){
getWorld().addObject(new Ball(), getX(), getY());
}
}
