Prototype health/ammo indication
This commit is contained in:
@@ -122,7 +122,7 @@ public class MinimapRenderer implements Disposable{
|
||||
float dy = (Core.camera.position.y / tilesize);
|
||||
dx = Mathf.clamp(dx, sz, world.width() - sz);
|
||||
dy = Mathf.clamp(dy, sz, world.height() - sz);
|
||||
float invTexWidth = 1f / texture.width;
|
||||
float invTexWidth = 1f / texture.getWidth();
|
||||
float invTexHeight = 1f / texture.height;
|
||||
float x = dx - sz, y = world.height() - dy - sz, width = sz * 2, height = sz * 2;
|
||||
region.set(x * invTexWidth, y * invTexHeight, (x + width) * invTexWidth, (y + height) * invTexHeight);
|
||||
|
||||
@@ -46,6 +46,7 @@ public class Pal{
|
||||
lightishGray = Color.valueOf("a2a2a2"),
|
||||
darkishGray = new Color(0.3f, 0.3f, 0.3f, 1f),
|
||||
darkerGray = new Color(0.2f, 0.2f, 0.2f, 1f),
|
||||
darkestGray = new Color(0.1f, 0.1f, 0.1f, 1f),
|
||||
ammo = Color.valueOf("ff8947"),
|
||||
rubble = Color.valueOf("1c1817"),
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ public class Shaders{
|
||||
setUniformf("u_progress", progress);
|
||||
setUniformf("u_uv", region.u, region.v);
|
||||
setUniformf("u_uv2", region.u2, region.v2);
|
||||
setUniformf("u_texsize", region.getTexture().width, region.getTexture().height);
|
||||
setUniformf("u_texsize", region.getTexture().getWidth(), region.getTexture().height);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ public class Shaders{
|
||||
setUniformf("u_uv", region.u, region.v);
|
||||
setUniformf("u_uv2", region.u2, region.v2);
|
||||
setUniformf("u_time", Time.time());
|
||||
setUniformf("u_texsize", region.getTexture().width, region.getTexture().height);
|
||||
setUniformf("u_texsize", region.getTexture().getWidth(), region.getTexture().height);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user