Package games.stendhal.tools.tiled

Examples of games.stendhal.tools.tiled.LayerDefinition.build()


    assertEquals(0, localzone.getItemsOnGround().toArray(new StackableItem[0])[0].getX());
    assertEquals(0, localzone.getItemsOnGround().toArray(new StackableItem[0])[0].getY());

    LayerDefinition collisionLayer = new LayerDefinition(10, 10);
    collisionLayer.setName("collision");
    collisionLayer.build();
    collisionLayer.set(0, 1, 255);
    localzone.addCollisionLayer("collisionlayer", collisionLayer);

    // now test the displacement action
    final RPAction displace = new RPAction();
View Full Code Here


  public void testCreateLayerDefintion() throws Exception {
    LayerDefinition layer;
    final int width = 3;
    final int height = 4;
    layer = new LayerDefinition(width, height);
    layer.build();
    layer.set(1, 2, 1);
    layer.set(2, 3, 1);

    final CollisionMap map = new CollisionMap(layer);
    assertThat(map.getWidth(), is(3));
View Full Code Here

  }

  private StendhalMapStructure generateMapStructure(int width, int height) {
    LayerDefinition floor = new LayerDefinition(width, height);
    floor.setName("0_floor");
    floor.build();

    LayerDefinition terrain = new LayerDefinition(width, height);
    terrain.setName("1_terrain");

    LayerDefinition object = new LayerDefinition(width, height);
View Full Code Here

  public void paint(StendhalMapStructure map) {
    LayerDefinition collision = map.getLayer("collision");
    LayerDefinition ground = map.getLayer("0_floor");
   
    // prepare the floor data arrays for for painting
    ground.build();
   
    Style style = new Style(map);
   
    drawFloor(style, ground, collision);
  }
View Full Code Here

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.