Hello Community,
this is my first post. Im new to programming and I have the Task to create a game for my computer science class
Im creating a jump and run and im trying to let a platform spawn randomly at the top of the screen everytime you jump on a platform of the same type.
Ive wrote this:
The Problem is that only one platform is spawning and when I jump on the next platform, a new one refuses to appear.
Please help me out.
Thanks in advance!
if (Greenfoot.isKeyDown("space")&& (onGround()== true))
{
this.getWorld().addObject(newGround, Greenfoot.getRandomNumber(180) + 48 , getImage().getHeight() + 500);
vSpeed = jumpHeight;
fall();
}
