use of com.almasb.fxgl.entity.control.RandomMoveControl in project FXGL by AlmasB.
the class NoiseSample method initGame.
@Override
protected void initGame() {
Entities.builder().at(100, 100).viewFromNodeWithBBox(new Rectangle(40, 40)).with(new RandomMoveControl(100, 50, 350, new Rectangle2D(0, 0, X_MAX - 0, Y_MAX - 0))).buildAndAttach(getGameWorld());
Entities.builder().at(50, 350).viewFromNode(new Rectangle(15, 15, Color.DARKCYAN)).buildAndAttach(getGameWorld());
}
Aggregations