This site requires JavaScript, please enable it in your browser!
Greenfoot back
bookguy
bookguy wrote ...

2018/6/25

how to make objects apear at the top

bookguy bookguy

2018/6/25

#
hi, i am trying to make a game where the astroids appear at the top, fall down, and then disapear, with intvals inbetween them and random numbers. thanks in advance
danpost danpost

2018/6/25

#
bookguy wrote...
i am trying to make a game where the astroids appear at the top, fall down, and then disapear, with intvals inbetween them and random numbers.
Which part are you having trouble with and what have you tried? (show attempted codes)
bookguy bookguy

2018/6/26

#
if (swapnCounter > 100){ spawnCounter = 0; addObject(new ship(), Greenfoot.getRandomNumber(getWidth(),0)); Greenfoot.getRandomNumber(getHeight())); } spawnCounter++;
danpost danpost

2018/6/26

#
bookguy wrote...
<< Code Omitted >>
Other than the miss-spelling of spawnCounter on the first line and the unnecessary random height line, I see no problems with the code given. Show entire class code for a more complete review.
You need to login to post a reply.