use of eidolons.libgdx.screens.map.layers.MapMoveLayers.MAP_POINTS in project Eidolons by IDemiurge.
the class MapParticles method init.
public void init() {
map.put(null, new ArrayList<>());
for (DAY_TIME sub : DAY_TIME.values()) {
map.put(sub, new ArrayList<>());
}
load();
for (MAP_EMITTER_GROUP sub : MAP_EMITTER_GROUP.values()) {
boolean displayed = false;
for (DAY_TIME time : sub.times) {
if (time == this.time) {
displayed = true;
break;
}
// same check for weather perhaps
}
if (sub.points != null)
for (MAP_POINTS point : sub.points) {
for (int i = 0; i < sub.number; i++) {
int mod = (i % 2 == 0) ? 1 : -1;
int offsetX = mod * sub.distance * i;
mod = (i % 3 == 0) ? 1 : -1;
int offsetY = mod * sub.distance * i;
EmitterActor emitter = create(sub.sfxPath, point.x + offsetX, point.y + offsetY, time);
if (displayed) {
this.displayed.add(emitter);
}
}
}
}
initialized = true;
}
Aggregations