Skip to content

Commit ff73aa4

Browse files
committed
Don't interfere with layers that are already in use
1 parent 8d7f91a commit ff73aa4

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/progressed/ProgMats.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ public void loadContent(){
130130
PMUnitTypes.load();
131131
PMItems.load();
132132
PMBullets.load();
133-
PMPlanets.load();
134133
PMBlocks.load();
134+
PMPlanets.load();
135135
PMTechTree.load();
136136
PMLoadouts.load();
137137
}

src/progressed/graphics/renders/DimRenderer.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,14 @@ public void line(float x, float y, float x2, float y2, float stroke, float alpha
178178
}
179179

180180
public void draw(){
181-
if(circleRegion == null) circleRegion = Core.atlas.find("circle-shadow");
182181
if(dimAlpha <= 0.001f){
183182
lights.clear();
184183
circleIndex = 0;
185184
return;
186185
}
187186

187+
if(circleRegion == null) circleRegion = Core.atlas.find("circle-shadow");
188+
188189
buffer.resize(Core.graphics.getWidth()/scaling, Core.graphics.getHeight()/scaling);
189190

190191
Draw.color();

src/progressed/graphics/renders/PMRenders.java

+8-4
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public static void init(){
3232
});
3333

3434
Events.run(Trigger.drawOver, () -> {
35-
Draw.draw(Layer.shields + 1f, blackHoleRenderer::draw);
36-
Draw.draw(Layer.playerName + 1f, () -> {
35+
Draw.draw(Layer.shields + 1.5f, blackHoleRenderer::draw);
36+
Draw.draw(Layer.playerName + 1.5f, () -> {
3737
dimRenderer.draw();
3838

3939
if(flashIntensity > 0.001f){
@@ -45,12 +45,16 @@ public static void init(){
4545
});
4646
}
4747

48-
public static void flash(float duration){
49-
flashIntensity = 1f;
48+
public static void flash(float intensity, float duration){
49+
flashIntensity = intensity;
5050
flashTime = Math.max(flashTime, duration);
5151
flashReduction = flashIntensity / flashTime;
5252
}
5353

54+
public static void flash(float duration){
55+
flash(1f, duration);
56+
}
57+
5458
public static void blackHole(float x, float y, float inRadius, float outRadius, Color color){
5559
if(headless) return;
5660
blackHoleRenderer.add(x, y, inRadius, outRadius, color);

0 commit comments

Comments
 (0)