|
|
@ -0,0 +1,30 @@ |
|
|
|
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!"; |
|
|
|
} |
|
|
|
} |