Package game.actors

Source Code of game.actors.PlayButtonActor

package game.actors;

import engine.geometry.Vector;
import engine.hierarchy.DefaultActor;
import game.habits.ButtonHabit;

public final class PlayButtonActor extends DefaultActor implements ButtonHabit.Listener {
    @Override
    public void onAdd() {
        addHabit(new ButtonHabit(new Vector(64, 64), getStage().getLibrary().findImage("Play Button").getFrames(140),
                this));
    }

    @Override
    public void onButton(final ButtonHabit button) {
        getStage().getLibrary().findMusic("Background Music").loop();
    }
}
TOP

Related Classes of game.actors.PlayButtonActor

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.