Unit selection overlay improvements

This commit is contained in:
Anuken
2024-04-17 23:28:01 -04:00
parent b8c6781004
commit 243cc1e527
3 changed files with 15 additions and 2 deletions

View File

@@ -131,7 +131,9 @@ public class OverlayRenderer{
Building build = (select instanceof BlockUnitc b ? b.tile() : select instanceof Building b ? b : null);
TextureRegion region = build != null ? build.block.fullIcon : select instanceof Unit u ? u.icon() : Core.atlas.white();
Draw.rect(region, select.getX(), select.getY(), select instanceof Unit u && !(select instanceof BlockUnitc) ? u.rotation - 90f : 0f);
if(!(select instanceof Unitc)){
Draw.rect(region, select.getX(), select.getY());
}
for(int i = 0; i < 4; i++){
float rot = i * 90f + 45f + (-Time.time) % 360f;
@@ -255,6 +257,12 @@ public class OverlayRenderer{
}
}
public void checkApplySelection(Unit u){
if(unitFade > 0 && lastSelect == u){
Draw.mixcol(Pal.accent, unitFade);
}
}
private static class CoreEdge{
float x1, y1, x2, y2;
Team t1, t2;