示例#1
0
  public OtherBoss() {
    super("Qubo");

    health = maxHealth = 50;
    size.getTarget().set(2, 2);
    fixture = rectCollision(2, 2);
    Filter filter = new Filter();
    filter.categoryBits = 0x80;
    filter.maskBits = 0x7;
    fixture.setFilterData(filter);
    fixture.setDensity(9999);
    damageOnTouch = 1.5f;

    DomeHat wh = new DomeHat(this, new Vector2(0, 1.2f));
    GameScreen.i.getEntities().add(wh);
  }
示例#2
0
 /**
  * adjust the density so that the mass has the given value
  *
  * @param mass
  */
 public void changeMass(float mass) {
   fixture.setDensity(mass / body.getMass() * fixture.getDensity());
   body.resetMassData();
 }