Optimizations
This commit is contained in:
@@ -57,7 +57,7 @@ public class BlockRenderer{
|
||||
|
||||
int expandr = 4;
|
||||
|
||||
Graphics.surface(renderer.effectSurface);
|
||||
Graphics.surface(renderer.effectSurface, true, false);
|
||||
|
||||
int avgx = Mathf.scl(camera.position.x, tilesize);
|
||||
int avgy = Mathf.scl(camera.position.y, tilesize);
|
||||
|
||||
@@ -40,7 +40,8 @@ public class Trail {
|
||||
points.clear();
|
||||
}
|
||||
|
||||
public synchronized void draw(Color start, Color end, float stroke){
|
||||
public synchronized void draw(Color color, float stroke){
|
||||
Draw.color(color);
|
||||
|
||||
for(int i = 0; i < points.size - 2; i += 2){
|
||||
float x = points.get(i);
|
||||
@@ -49,8 +50,6 @@ public class Trail {
|
||||
float y2 = points.get(i + 3);
|
||||
float s = Mathf.clamp((float)(i) / points.size);
|
||||
|
||||
Draw.color(start, end, s);
|
||||
|
||||
Lines.stroke(s * stroke);
|
||||
Lines.line(x, y, x2, y2);
|
||||
}
|
||||
@@ -59,8 +58,6 @@ public class Trail {
|
||||
Fill.circle(points.get(points.size-2), points.get(points.size-1), stroke/2f);
|
||||
}
|
||||
|
||||
Draw.color(start);
|
||||
|
||||
Draw.reset();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user