예제 #1
0
 public void process(long ticks, Level level) {
   super.process(ticks, level);
   if (shield.getVisibility()) {
     shield.rotateY((float) ticks * 0.3f);
     // shield.setScale(1+(float)Math.sin(shield.getZAxis().x)/6f);
   }
 }
예제 #2
0
 public void hitByExplosion(
     CollisionParticipant source, LocalObject obj, DecalManager decal, CollisionEvent ce) {
   if (shield.getVisibility()) {
     // If the shield is visible, we are invincible...
     return;
   }
   Event event = new Event(Event.EXPLOSION_HIT, -99, obj.getObjectID(), obj.getClientID());
   source.getEventQueue().add(event);
 }
예제 #3
0
 public void setToLocalObject(LocalObject lo) {
   super.setToLocalObject(lo);
   if (lo.isInvincible() && !shield.getVisibility()) {
     shield.setVisibility(true);
   } else {
     if (!lo.isInvincible()) {
       shield.setVisibility(false);
     }
   }
 }