Examples of Tile


Examples of com.mojang.ld22.level.tile.Tile

  public void tick() {
    super.tick();

    if (invulnerableTime > 0) invulnerableTime--;
    Tile onTile = level.getTile(x >> 4, y >> 4);
    if (onTile == Tile.stairsDown || onTile == Tile.stairsUp) {
      if (onStairDelay == 0) {
        changeLevel((onTile == Tile.stairsUp) ? 1 : -1);
        onStairDelay = 10;
        return;
View Full Code Here

Examples of com.mojang.minecraft.level.tile.Tile$SoundType

         this.walkDist = (float)((double)this.walkDist + (double)MathHelper.sqrt(var18 * var18 + var17 * var17) * 0.6D);
         if(this.makeStepSound) {
            int var19 = this.level.getTile((int)this.x, (int)(this.y - 0.2F - this.heightOffset), (int)this.z);
            if(this.walkDist > (float)this.nextStep && var19 > 0) {
               ++this.nextStep;
               Tile$SoundType var20;
               if((var20 = Block.blocks[var19].stepsound) != Tile$SoundType.none) {
                  this.playSound("step." + var20.name, var20.getVolume() * 0.75F, var20.getPitch());
               }
            }
         }

         this.ySlideOffset *= 0.4F;
View Full Code Here

Examples of com.rosiminc.pm.game.Tile

   * @param original
   *            the original tile
   * @return the generated tile
   */
  private Tile generateTile(Tile original) {
    Tile aTile;
    boolean invalid = true;

    do {
      aTile = Tile.getTile((int) (Math.random() * 15)+1);
      invalid = (aTile.getNumSides() == original.getNumSides());
    } while (invalid);

    return aTile;
  }
View Full Code Here

Examples of com.rosiminc.pm.game.Tile

    JPanel panel = new JPanel(new BorderLayout());
    //panel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
    panel.setBorder(BorderFactory.createEmptyBorder());

    Tile t = board[row][col];

    JLabel label = new JLabel();
    label.setIcon(images[t.getTileNumber()]);
    label.addMouseListener(new TileListener(row, col));
   
    imgTiles[row][col] = label;
    panel.add(label, BorderLayout.CENTER);
    return panel;
View Full Code Here

Examples of com.rosiminc.pm.game.Tile

    JPanel panel = new JPanel(new BorderLayout());
    //panel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
    panel.setBorder(BorderFactory.createEmptyBorder());

    Tile t = board[row][col];

    JLabel label = new JLabel();
    label.setIcon(images[t.getTileNumber()]);
    label.addMouseListener(new TileListener(row, col));
   
    imgTiles[row][col] = label;
    panel.add(label, BorderLayout.CENTER);
    return panel;
View Full Code Here

Examples of com.rosiminc.pm.game.Tile

  private Component getTile(int row, int col) {
   
    JPanel panel = new JPanel();
   
    Tile t = board[row][col];
   
   
    panel.setBorder(
        BorderFactory.createCompoundBorder(
            BorderFactory.createEmptyBorder(
                0,0,0,0),
       
       
        BorderFactory.createMatteBorder(
            t.isUp()?0:3, t.isLeft()?0:3,
            t.isDown()?0:3, t.isRight()?0:3,
            (row+col)%2==0?Color.BLUE:Color.RED)));
   
    /*int tileNum = (int)(Math.random()*16);
    String address = "img/p" + tileNum + ".bmp";
    ImageIcon image = new ImageIcon(address);
View Full Code Here

Examples of com.rosiminc.pm.game.Tile

  private Component getTile(int row, int col) {
   
    JPanel panel = new JPanel();
   
    Tile t = board[row][col];
   
   
    /*panel.setBorder(
        BorderFactory.createCompoundBorder(
            BorderFactory.createEmptyBorder(
                0,0,0,0),
       
       
        BorderFactory.createMatteBorder(
            t.isUp()?0:3, t.isLeft()?0:3,
            t.isDown()?0:3, t.isRight()?0:3,
            (row+col)%2==0?Color.BLUE:Color.RED)));*/
   
    /*int tileNum = (int)(Math.random()*16);
    String address = "img/p" + tileNum + ".bmp";
    ImageIcon image = new ImageIcon(address);
    System.out.println(address);
    JLabel button = new JLabel(image);
   
    //button.setIcon(image);
   
    return button;*/
    //panel.add(new JButton("X"));
    Image image;
    try {
      image = ImageIO.read(new File (String.format("images/p%d.bmp", t.getTileNumber())));
      JButton btn = new JButton(new ImageIcon(image));
      btn.setVisible(true);
      btn.setContentAreaFilled(false);
      panel.add(btn);
    } catch (MalformedURLException e) {
View Full Code Here

Examples of com.thecherno.cherno.engine.level.tile.Tile

    int y1 = (int) (y0 + screen.getHeight() / screen.getScale() / tileSize) + 2;
    // System.out.println("Boundaries: " + x0 + "->" + x1 + ", " + y0 + "->" + y1);
    for (int yy = 0; yy < height; yy++) {
      for (int xx = 0; xx < width; xx++) {
        if (xx < x0 || xx >= x1 || yy < y0 || yy >= y1) continue;
        Tile tile = getTile(xx, yy);
        if (tile == null) continue;
        int tx = -xOffset + xx * tile.getWidth();
        int ty = -yOffset + yy * tile.getHeight();
        screen.render(tx, ty, tile);
      }
    }
    super.render(screen);
  }
View Full Code Here

Examples of com.threerings.media.tile.Tile

        // add all of the toolbar buttons
        _buttons = Lists.newArrayList();
        for (int ii = 0; ii < EditorModel.NUM_ACTIONS; ii++) {
            // get the button icon images
            Tile tile = tbset.getTile(ii);
            if (tile != null) {
                String cmd = EditorModel.CMD_ACTIONS[ii];
                String tip = EditorModel.TIP_ACTIONS[ii];

                // create the button
View Full Code Here

Examples of com.tinygo.gam.Tile

        for (int x = 0; x < zoomW; x++)
            for (int y = 0; y < zoomH; y++)
                oldWits[x][y].clear(0);

        gobanTile = Image.createImage(gobanViewDevW, gobanViewDevH);
        Tile board = tilePainter.createTile(gobanViewDevW, gobanViewDevH);
        tilePainter.drawPlainBoard(board);
        gobanTile.getGraphics().drawRGB(board.pixels32, 0, board.width, 0, 0, board.width, board.height, false);

        cursorTile = tilePainter.createTile(gridStep + 1, gridStep + 1);
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.