Package game.layers

Examples of game.layers.DynamicLayer


    }

    @Override
    public void onAdd() {
        addLayer(new BackgroundLayer(level.getChunks()));
        DynamicLayer d = addLayer(new DynamicLayer());
        addLayer(new ForegroundLayer(level.getChunks()));
        addLayer(new BlocksLayer(level.getBlocks())).setVisible(false);

        for (Actor a : actors) {
            if (a.getName().equals("player")) {
                d.addActor(new PlayerActor(new Vector(Double.valueOf(a.getArgs()[0]), Double.valueOf(a.getArgs()[1]))));
            } else if (a.getName().equals("soldier")) {
                d.addActor(new SoldierActor(new Vector(Double.valueOf(a.getArgs()[0]), Double.valueOf(a.getArgs()[1]))));
            } else if (a.getName().equals("sign")) {
                d.addActor(new SignActor(a.getArgs()[4], new Rectangle(Double.valueOf(a.getArgs()[0]), Double.valueOf(a
                        .getArgs()[1]), Double.valueOf(a.getArgs()[2]), Double.valueOf(a.getArgs()[3]))));
            } else if (a.getName().equals("metal")) {
                d.addActor(new MetalActor(new Rectangle(Double.valueOf(a.getArgs()[0]), Double.valueOf(a.getArgs()[1]),
                        Double.valueOf(a.getArgs()[2]), Double.valueOf(a.getArgs()[3]))));
            } else {
                System.out.println("Unknown Actor in level file: " + a.getName());
            }
        }
View Full Code Here

TOP

Related Classes of game.layers.DynamicLayer

Copyright © 2018 www.massapicom. 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.