MEngine.addMouseUpHandler(this);
}
@Override
public void onScreen() {
this.buttons[0]=new StartButton(new Point(getGameWidth()/2.0,getGameHeight()/2.0));
this.buttons[1]=new InformationButton(new Point(55,getGameHeight()-55));
this.buttons[2]=new GuideButton(new Point(55,getGameHeight()-160));
this.creator=new Creator(new Level(MEngine.getAssetManager().getJson("levels/welcome_level.json"),new Point(getGameWidth()/2,getGameHeight()/2)));
creator.build(new GameOverCallback(){
@Override
public void showScore(int score) {
WelcomePage.this.buttons[0].doTask();
}
});
for(GameButton button:buttons){
root.addComponentOnLayer(button);
}
root.addLayer(new ImageLayer(MEngine.getAssetManager().getSpriteSheet("images/welcome_bg.png"), new Point(0,0), getGameWidth(), getGameHeight()));
root.addComponentOnLayer(new GameLabel(new Point(getGameWidth()-5,3), TextAlign.RIGHT, TextBaseline.TOP, ASBOTXConfigs.VERSION, ASBOTXConfigs.Color.TEXT, ASBOTXConfigs.getCGFont(12)));
root.addComponentOnLayer(creator.getWorld());
}