Package org.newdawn.slick.geom

Examples of org.newdawn.slick.geom.Rectangle


    ySpeed = 0;
    speed = 0.2;
    maxAge = 1500;
    age = 0;
    baseDamage = 10;
    mask = new Rectangle((float)(xPos+(width-maskWidth)/2), (float)(yPos+(width-maskHeight)/2), (float)maskWidth, (float)maskHeight)
  }
View Full Code Here


  }

 
 
  public void handleCollisions(int delta, Chunk prevChunk, Chunk currChunk, Chunk nextChunk){
    Rectangle newMask = getNextMask((float)xSpeed*delta, 0f);
    CollisionGroup sideBlocks = getSideBlocks(prevChunk, currChunk, nextChunk, newMask);
    for (BlockMask blockMask: sideBlocks.orderedArray){
      if (blockMask.block != null && blockMask.block.isSolid && Utils.intersects(blockMask.mask, newMask)){
        //KABOOM
        blowUp(blockMask);
View Full Code Here

  }


  @Override
  public Rectangle getNextMask(float xs, float ys){
    return new Rectangle((float)(xPos+(width-maskWidth)/2) + xs, (float)(yPos+(height-maskHeight)/2) + ys, (float)(maskWidth), (float)maskHeight);
  }
View Full Code Here

    dead = false;
   
    xSpeed = posXSpeed*xMove;
    ySpeed = posYSpeed*yMove;
   
    mask = new Rectangle((float)(x), (float)(y), (float)BlockSand.WIDTH, (float)BlockSand.WIDTH);
  }
View Full Code Here

         
        }
    }
    y = y+ySpeed*delta;
    x = x+xSpeed*delta;
    mask = new Rectangle((float)(x), (float)(y), (float)BlockWater.WIDTH, (float)BlockWater.WIDTH);
   
   
  }
View Full Code Here

  public abstract void doLogic(int delta, Chunk prevChunk, Chunk currChunk, Chunk nextChunk);
 
  public abstract void render(double worldPos);
 
  public void handleCollisions(int delta, Chunk prevChunk, Chunk currChunk, Chunk nextChunk){
    Rectangle newMask = getNextMask((float)xSpeed*delta, 0f);
    CollisionGroup sideBlocks = getSideBlocks(prevChunk, currChunk, nextChunk, newMask);
    for (BlockMask blockMask: sideBlocks.orderedArray){
      if (blockMask.block != null && blockMask.block.isSolid && Utils.intersects(blockMask.mask, newMask)){
        //KABOOM
        blowUp(blockMask);
View Full Code Here

    itemID = 0;
    width = 12;
    height = 12;
    maxAge = -1;
    age = 0;
    mask = new Rectangle((float)(this.x), (float)(yPos), (float)(width), (float)height);
  }
View Full Code Here

    x = 0.0;
    xSpeed = .1/400;
    currChunkIndex = 0;
    chunkCount = 1;
    delayStart = 0;
    mask = new Rectangle((float)(x), (float)(0), (float)Block.WIDTH, (float)BlockSand.WIDTH*Chunk.CHUNK_HEIGHT);
  }
 
View Full Code Here

    }
   
    for (int y =0; y<Chunk.CHUNK_HEIGHT; y++){
      Utils.changeCurrentBlock(new BlockLava(), x, y*Block.WIDTH);
    }
    mask = new Rectangle((float)(x), (float)(0), (float)Block.WIDTH, (float)BlockSand.WIDTH*Chunk.CHUNK_HEIGHT);
  }
 
View Full Code Here

 
  public BlockMask(Block block, double x, double y){
    xPos = x;
    yPos = y;
    this.block = block;
    mask = new Rectangle((float)x, (float)y, (float)Block.WIDTH, (float)Block.WIDTH);
  }
View Full Code Here

TOP

Related Classes of org.newdawn.slick.geom.Rectangle

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.