hello i have one actor that you can move left and right called "paddle" and the other one that you can spawn by pressing "space" called "ball". but i told it where to spawn with coordiantes. how can i let the ball spawn and exact amount of pixels above the paddle, no matter where it is?
public void NeuesPaddel()
{
addObject(new Paddel(), 320, 450);
} public void NeuerBall(){
if (Greenfoot.isKeyDown("space") &&
getObjects(Ball.class) .size() == 0)
{
Ball ball = new Ball();
addObject (ball, 320, 400);
}
}
