You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
726 B

2 years ago
  1. package playground;
  2. import gameobjects.GameObject;
  3. import gameobjects.RectObject;
  4. import java.awt.Color;
  5. /**
  6. * Represents the LevelWithBox.
  7. * @author Nour Den Almasri
  8. *
  9. */
  10. public class LevelWithBox extends SpaceInvadersLevel {
  11. /**
  12. * Method prepares the new level.
  13. * @param id String represents the level
  14. *
  15. */
  16. @Override
  17. public void prepareLevel(String id) {
  18. super.prepareLevel(id);
  19. GameObject o = new RectObject("red", this, 350, 100, 0, 0, 700, 250, Color.RED);
  20. this.addObject(o);
  21. }
  22. /**
  23. * Method show the Start's message.
  24. * @return the message should be showed
  25. */
  26. @Override
  27. protected String getStartupMessage() {
  28. return "Get ready for box-Level!";
  29. }
  30. }