Prototype health/ammo indication

This commit is contained in:
Anuken
2020-09-13 21:08:24 -04:00
parent be229f441e
commit 7ce93c7f85
28 changed files with 1694 additions and 1542 deletions

View File

@@ -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);

View File

@@ -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"),

View File

@@ -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);
}
}