Examples of Air


Examples of Engine.Blocks.Air

  public void Generate(int seed, int cx, Random random) {
    this.seed = seed;
    for (int y = 0; y < TerrainHeight; y++) {
      // XReihe Durchgehen
      for (int x = 0; x < TerrainWidth; x++) {
        blocks[y][x] = new Air();
        if (y == TerrainHeight)
          blocks[y][x] = new Bedrock();
      }
    }
    // for (int y = 0; y < TerrainHeight; y++) {
    // XReihe Durchgehen
    for (int x = 0; x < TerrainWidth; x++) {
      // Sys.alert("Pos", "X:"+x+" Y: "+y +
      // " BLocks: "+blocks.length);
      /*
       * if (y > TerrainHeight - 10+(5*Math.sin(x/seed))) { blocks[y][x] =
       * new Dirt(); } if (y == (int)(TerrainHeight
       * -10+(5*Math.sin(x/seed)))) {
       *
       * }
       */
      for (int y = TerrainHeight - 2; y > GetTerrainHeight(x + (cx * 16)); y--) {
        blocks[y][x] = new Dirt();
      }
      for (int y = TerrainHeight - 2; y > GetTerrainHeight(x + (cx * 16))
          + 4 + random.nextInt(2); y--) {
        if (y >= 0)
          blocks[y][x] = new Stone();
      }
      for (int y = TerrainHeight - 2; y > TerrainHeight - 15; y--) {
        if (y >= 0)
          if (blocks[y][x].ID() == (new Air()).ID())
            blocks[y][x] = new Water();
      }
      blocks[GetTerrainHeight(x + (cx * 16))][x] = new Gras();

    }
View Full Code Here

Examples of Engine.Blocks.Air

      // System.out.println(blocks[Y][X].ID());
      return blocks[Y][X];

    } catch (Exception ex) {
      // System.out.println("No in Terrain Physic: X: " + X + " Y: " + Y);
      return new Air();
    }

  }
View Full Code Here

Examples of nexus.model.renderable.Air

        for (int k = 0; k < HEIGHT; k++) {
          if (k <= y) {
            this.blocks[i][j][k] = new Solid(new Vector3(x, (float) k, z), 1.0f, this.colorist);
          } else {
            this.blocks[i][j][k] = new Air(new Vector3(x, (float) k, z), 1.0f)
          }
        }
      }
    }
  }
View Full Code Here

Examples of nexus.model.renderable.Air

          model.chunks.getBlock(target).getMask().setDrawOutline(true);
          model.chunks.selected = target;
        }
       
        if (Mouse.isButtonDown(0)) {
          model.chunks.setBlock(new Air(model.chunks.selected, 1.0f));
        }
       
        if (Mouse.isButtonDown(1)) {
          Block newBlock = new Solid(model.chunks.getBlock(model.chunks.selected).a.add(new Vector3(0f, 1f, 0f)), 1.0f, new Greyscale(16.0f, 0.0f));
          model.chunks.setBlock(newBlock);
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.