package game.actors;
import engine.geometry.Vector;
import engine.hierarchy.DefaultActor;
import engine.interfaces.Image;
import game.habits.ButtonHabit;
public final class StopButtonActor extends DefaultActor implements ButtonHabit.Listener {
@Override
public void onAdd() {
Image image = getStage().getLibrary().findImage("Stop Button");
addHabit(new ButtonHabit(new Vector(64, 192), image.getFrames(image.getWidth() / 3), this));
}
@Override
public void onButton(final ButtonHabit button) {
getStage().getLibrary().findMusic("Background Music").stop();
}
}