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.

30 lines
718 B

package playground;
import java.awt.Color;
import gameobjects.RectObject;
/**
* Class LevelWithBox creates level with red box at the top.
* Red box is called "Red Box".
* @author 26
*/
public class LevelWithBox extends SpaceInvadersLevel {
/** Method creates red Box at the top in level LevelWithBox.
* @param id String a string identifying the level number etc
*/
@Override
public void prepareLevel(String id) {
super.prepareLevel(id);
addObject(new RectObject("Red Box", this, 350, 100, 0, 0, 700, 250, Color.RED));
}
/** Method shows message at the start of LevelWithBox.
* @return String start message
*/
@Override
protected String getStartupMessage() {
return "Box-Level!";
}
}