Package org.newdawn.slick.geom

Examples of org.newdawn.slick.geom.Rectangle


      }
    }
  }
 
  public void climbingPhysics(int delta, Chunk prevChunk, Chunk currChunk, Chunk nextChunk){
    Rectangle newMask = getNextMask(0f, (float)ySpeed*delta);
    CollisionGroup sideBlocks = getSideBlocks(prevChunk, currChunk, nextChunk, newMask);
    if (sideBlocks.bottomLeft.block == null || sideBlocks.bottomRight.block == null || sideBlocks.topLeft.block == null || sideBlocks.topRight.block == null){
      ySpeed = 0;
    }
    else
View Full Code Here


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

  public Air(double startx, double starty){
    x = startx;
    y = starty;
    id = Type.AIR;
    solid = false;
    mask = new Rectangle((float)x, (float)y, (float)width, (float)width);
  }
View Full Code Here

  public Grass(double startx, double starty){
    x = startx;
    y = starty;
    id = Type.GRASS;
    solid = true;
    mask = new Rectangle((float)x, (float)y, (float)width, (float)width);
  }
View Full Code Here

    gravity = 0.0006;
    facing = -1;
    type = BaddyType.SQUIRM;
    maskWidth = 14;
    maskHeight = 16;
    mask = new Rectangle((float)(x-maskWidth/2), (float)y, (float)(maskWidth), (float)maskHeight);
    standing = false;
    jumping = false;
    jumpSpacing = 1000;
    timeSinceJump = jumpSpacing + 1;
    maxJumps = 1;
View Full Code Here

    //texture = textures[texID];
  }
 
  public void horizontalPhysics(int delta){
    Block[] sideBlocks = env.getSideBlocks(x, y, width);
    Rectangle newMask = getMask((float)xSpeed, 0f);
    if (xSpeed > 0){
      for (int i = 1; i < 6; i+=2){
        if (sideBlocks[i] != null && sideBlocks[i].solid && Utils.intersects(sideBlocks[i].mask, newMask)){
          xSpeed = 0;
          facing = -1;
View Full Code Here

  public Orb(double startx, double starty){
    x = startx;
    y = starty;
    id = Type.ORB;
    solid = true;
    mask = new Rectangle((float)x, (float)y, (float)width, (float)width);
    texture = Grass.textures[6];
  }
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)BlockLava.WIDTH, (float)BlockLava.WIDTH);
   
   
  }
View Full Code Here

    ySpeed = 0;
    speed = 0.3;
    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

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.