game over


SUBMITTED BY: ajiamino

DATE: Feb. 2, 2016, 6:02 a.m.

FORMAT: Text only

SIZE: 678 Bytes

HITS: 3452

  1. Well, I'm really tired right now, and I just can't seem to make one of the Game Over screens that are on everyone's games. I have tried making a rectangle, to which I will add some text. The code below has been inserted into the Act statement of an Actor subclass imaginatively named "GameOver". When I run the simulation, nothing appears; don't know the reason why: if (getWorld().getObjects(car.class).isEmpty()) { GreenfootImage gameOver = new GreenfootImage(100, 100); gameOver.setColor(java.awt.Color.RED); gameOver.fill(); setImage(gameOver); } As always, would really appreciate the help, especially if someone shows me a good technique to create these Game Over screens.

comments powered by Disqus