Examples of StaticBody


Examples of net.phys2d.raw.StaticBody

    body.setPosition(startX + x / 2.0f, startY + y / 2.0f);
    return init(entity, body);
  }
 
  public Body addAxisAlignedWall(Entity entity, float width, float height) {
    StaticBody body = new StaticBody(new Box(width, height));
    body.setPosition(this.position.getX(), this.position.getY());
    return init(entity, body);
  }
View Full Code Here

Examples of net.phys2d.raw.StaticBody

      throw new IllegalArgumentException("Can't create new body with specific ID.");
    paramb = new com.a.b.b(paramb);
    Object localObject;
    if (paramb.p())
    {
      localObject = new StaticBody(paramb.b(), a(paramb.o()));
      paramb.i(((Body)localObject).getMass());
    }
    else
    {
      localObject = new Body(paramb.b(), a(paramb.o()), (float)paramb.n());
View Full Code Here

Examples of org.newdawn.fizzy.StaticBody

  protected void placeCrosshairs(){
    Body currentBeaverBody = currentPlayer.getCurrentBeaver().getBody();
    world.remove(crosshair);
    float x = (float) (currentBeaverBody.getX() + 100*Math.sin(Math.toRadians(crosshairAngle)));
    float y = (float) (currentBeaverBody.getY() + 100*Math.cos(Math.toRadians(crosshairAngle)));
    crosshair = new StaticBody(new Circle(10),x,y);
    world.add(crosshair);
    crosshair.setActive(false);
  }
View Full Code Here

Examples of org.newdawn.fizzy.StaticBody

    world.addBodyListener(item[0].getBody(), this);
    world.addBodyListener(item[1].getBody(), this);
   
    Body currentBeaverBody = currentPlayer.getCurrentBeaver().getBody();
    crosshairAngle = 45;
    crosshair = new StaticBody(new Rectangle(50f,5f),currentBeaverBody.getX(),currentBeaverBody.getY());
    world.add(crosshair);
    crosshair.setRotation(crosshairAngle);
    crosshairImage = new Image("data/crosshair.png").getScaledCopy(0.5f);
    bulletImage = new Image("data/wood.png").getScaledCopy(0.5f);
    healthImage = new Image("data/health.png").getScaledCopy(0.5f);
View Full Code Here

Examples of org.newdawn.fizzy.StaticBody

    compoundTerrain = new CompoundShape();
    for (int i = 0; i < Constants.MAX_WIDTH; i++){
      compoundTerrain.add(terrain[i]);
    }   
   
    terrainBody = new StaticBody(compoundTerrain, x0, y0);
    terrainBody.setFriction(1000);
    terrainBody.setRestitution(0.1f);

    world.add(terrainBody);
    leftmostXFromExplosion = 1000000f;
View Full Code Here

Examples of org.newdawn.fizzy.StaticBody

    boundaryShape.add(top);
    boundaryShape.add(left);
    boundaryShape.add(right);
    boundaryShape.add(bottom);

    return new StaticBody(boundaryShape,0,0);
  }
View Full Code Here

Examples of org.newdawn.fizzy.StaticBody

    world.addBodyListener(item[0].getBody(), this);
    world.addBodyListener(item[1].getBody(), this);
   
    Body currentBeaverBody = currentPlayer.getCurrentBeaver().getBody();
    crosshairAngle = 45;
    crosshair = new StaticBody(new Rectangle(50f,5f),currentBeaverBody.getX(),currentBeaverBody.getY());
    world.add(crosshair);
    crosshair.setRotation(crosshairAngle);
    crosshairImage = new Image("data/crosshair.png").getScaledCopy(0.5f);
    bulletImage = new Image("data/wood.png").getScaledCopy(0.5f);
    healthImage = new Image("data/health.png").getScaledCopy(0.5f);
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.