示例#1
0
 public void removeLightSourceType(LightSource.Type lightType) {
   if (lightSourceList != null) {
     for (ListIterator<AttachedLightSource> i = lightSourceList.listIterator(); i.hasNext(); ) {
       AttachedLightSource als = i.next();
       LightSource lightSource = MapTool.getCampaign().getLightSource(als.getLightSourceId());
       if (lightSource != null && lightSource.getType() == lightType) i.remove();
     }
   }
 }
示例#2
0
 public boolean hasLightSourceType(LightSource.Type lightType) {
   if (lightSourceList != null) {
     for (ListIterator<AttachedLightSource> i = lightSourceList.listIterator(); i.hasNext(); ) {
       AttachedLightSource als = i.next();
       LightSource lightSource = MapTool.getCampaign().getLightSource(als.getLightSourceId());
       if (lightSource != null && lightSource.getType() == lightType) return true;
     }
   }
   return false;
 }
示例#3
0
 public void removeOwnerOnlyAuras() {
   if (lightSourceList != null) {
     for (ListIterator<AttachedLightSource> i = lightSourceList.listIterator(); i.hasNext(); ) {
       AttachedLightSource als = i.next();
       LightSource lightSource = MapTool.getCampaign().getLightSource(als.getLightSourceId());
       if (lightSource != null) {
         List<Light> lights = lightSource.getLightList();
         for (Light light : lights) {
           if (light.isOwnerOnly()) i.remove();
         }
       }
     }
   }
 }
示例#4
0
  public void world2Cam(final Camera aCamera) throws PolygonException, MatrixException {
    // TODO optimized code for multi core processors, but does dis has the wanted effect?

    for (int i = 0; i < myShapes.length; i++) {
      myShapes[i].world2Cam(aCamera);
    }
    for (int i = 0; i < myPointShapes.length; i++) {
      myPointShapes[i].world2Cam(aCamera);
    }

    for (LightSource theLighteSource : lightSources) {
      theLighteSource.world2Cam(aCamera);
    }
  }
示例#5
0
 public boolean hasGMAuras() {
   if (lightSourceList != null) {
     for (ListIterator<AttachedLightSource> i = lightSourceList.listIterator(); i.hasNext(); ) {
       AttachedLightSource als = i.next();
       LightSource lightSource = MapTool.getCampaign().getLightSource(als.getLightSourceId());
       if (lightSource != null) {
         List<Light> lights = lightSource.getLightList();
         for (Light light : lights) {
           if (light.isGM()) return true;
         }
       }
     }
   }
   return false;
 }
示例#6
0
 public void removeLightSource(LightSource source) {
   if (lightSourceList == null) {
     return;
   }
   for (ListIterator<AttachedLightSource> i = lightSourceList.listIterator(); i.hasNext(); ) {
     AttachedLightSource als = i.next();
     if (als != null
         && als.getLightSourceId() != null
         && als.getLightSourceId().equals(source.getId())) {
       i.remove();
     }
   }
 }
示例#7
0
 public boolean hasLightSource(LightSource source) {
   if (lightSourceList == null) {
     return false;
   }
   for (ListIterator<AttachedLightSource> i = lightSourceList.listIterator(); i.hasNext(); ) {
     AttachedLightSource als = i.next();
     if (als != null
         && als.getLightSourceId() != null
         && als.getLightSourceId().equals(source.getId())) {
       return true;
     }
   }
   return false;
 }
示例#8
0
 @Override
 public void setDuration(int duration) {
   readableText = "" + duration;
   super.setDuration(duration);
 }