package game.actors.mainmenu;
import engine.geometry.Rectangle;
import engine.hierarchy.DefaultActor;
import game.habits.ClickHabit;
import game.scenes.FadeThroughBlackScene;
import game.scenes.LevelScene;
import game.terrain.ImageParser;
public final class PlayButtonActor extends DefaultActor implements ClickHabit.Listener {
private Rectangle bounds;
public PlayButtonActor(final Rectangle bounds) {
this.bounds = bounds;
}
@Override
public void onAdd() {
addHabit(new ClickHabit(this, bounds));
}
@Override
public void onClick(final ClickHabit click) {
getStage().insertSceneAbove(new FadeThroughBlackScene(new LevelScene(ImageParser.makeDesertLevel())),
getScene());
}
}