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(); } } }
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; }
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(); } } } } }
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); } }
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; }
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(); } } }
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; }
@Override public void setDuration(int duration) { readableText = "" + duration; super.setDuration(duration); }