use of eidolons.libgdx.screens.map.layers.LightLayer.LightContainer in project Eidolons by IDemiurge.
the class LightLayer method init.
@Override
protected void init() {
for (LIGHT_LAYER sub : LIGHT_LAYER.values()) {
MapMaster.addToFloatMap(timerMap, sub, 0f);
MapMaster.addToFloatMap(triggerMap, sub, 0f);
}
// randomize?
for (LIGHT_LAYER sub : LIGHT_LAYER.values()) {
// random position?
for (int i = 0; i < sub.maxCount; i++) {
LightContainer container = new LightContainer(getPath() + sub.name().replace("_", " ") + ".png", sub);
container.setAlphaTemplate(sub.alphaTemplate);
for (DAY_TIME time : sub.times) MapMaster.addToListMap(map, time, container);
}
}
initialized = true;
}
use of eidolons.libgdx.screens.map.layers.LightLayer.LightContainer in project Eidolons by IDemiurge.
the class LightLayer method spawnLayer.
@Override
protected void spawnLayer() {
if (uiStage)
setSize(GdxMaster.getWidth(), GdxMaster.getHeight());
else
setSize(MapScreen.defaultSize, MapScreen.defaultSize);
displayed = map.get(time);
for (LightContainer sub : displayed) {
// triggerMap.put(sub, time);
// if implement oneshot light, this will be easier
}
// Collections.shuffle(displayed);
// add gradually?
// remove if alpha zero?
// displayed = displayed.subList(0, getMaxLayers());
displayed.forEach(LightContainer -> {
adjust(LightContainer);
});
}
use of eidolons.libgdx.screens.map.layers.LightLayer.LightContainer in project Eidolons by IDemiurge.
the class LightLayer method addLight.
protected void addLight(LIGHT_LAYER sub) {
LightContainer container = new LightContainer(getPath() + sub.name().replace("_", " ") + ".png", sub);
// container.setAlphaTemplate(sub.alphaTemplate);
adjust(container);
ActorMaster.addFadeInAndOutAction(container.getContent(), 2.5f, true);
}
Aggregations