|
|
@ -2,6 +2,8 @@ package playground; |
|
|
|
|
|
|
|
import java.awt.Color; |
|
|
|
|
|
|
|
import controller.ObjectController; |
|
|
|
import controller.ReboundController; |
|
|
|
import gameobjects.RectObject; |
|
|
|
|
|
|
|
/** This level adds two distracting objects to the canvas that cannot collide but bounce around all the time. |
|
|
@ -11,8 +13,10 @@ public class LevelMovingObjects extends SpaceInvadersLevel { |
|
|
|
public void prepareLevel(String id) { |
|
|
|
super.prepareLevel(id); |
|
|
|
LevelMovingObjects ml = this; |
|
|
|
RectObject object2 = new RectObject(id +"Bluebox",ml,300,300,170,70,30,30,Color.BLUE); |
|
|
|
this.addObject(object2); |
|
|
|
RectObject blueBox = new RectObject(id +"Bluebox",ml,300,300,170,70,30,30,Color.BLUE); |
|
|
|
this.addObject(blueBox); |
|
|
|
ObjectController rb = new ReboundController(); |
|
|
|
blueBox.addController(rb); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|