Package game.actors

Source Code of game.actors.MetalActor

package game.actors;

import engine.geometry.Polygon;
import engine.geometry.Rectangle;
import engine.hierarchy.DefaultActor;
import game.habits.DynamicHabit;
import game.habits.MetalHabit;
import game.habits.StaticHabit;

public class MetalActor extends DefaultActor {
    Polygon bounds;

    public MetalActor(final Rectangle bounds) {
        this.bounds = bounds.toPolygon();
    }

    @Override
    protected void onAdd() {
        DynamicHabit dynamic = addHabit(new StaticHabit(bounds));
        addHabit(new MetalHabit(dynamic));
    }
}
TOP

Related Classes of game.actors.MetalActor

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.