Esempio n. 1
0
 public void setToLocalObject(LocalObject lo) {
   super.setToLocalObject(lo);
   if (lo.isInvincible() && !shield.getVisibility()) {
     shield.setVisibility(true);
   } else {
     if (!lo.isInvincible()) {
       shield.setVisibility(false);
     }
   }
 }
Esempio n. 2
0
  private void createShieldMesh() {
    shield = new Object3D(sphereBluePrint);
    shield.setVisibility(false);
    shield.setMesh(sphereBluePrint.getMesh());
    shield.build();
    shield.translate(0, 4.5f, 0);
    shield.setTransparency(7);
    shield.setTransparencyMode(Object3D.TRANSPARENCY_MODE_ADD);

    if (Globals.compiledObjects) {
      shield.compile();
    }

    addChildToSuper(shield);
  }