mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-26 06:22:17 -08:00
New Unit Select (#3672)
* New Unit Select * Fix * Facepalm * Code Fix * Texture Fix
This commit is contained in:
parent
52e47a28c4
commit
da8ea84397
2 changed files with 7 additions and 2 deletions
BIN
core/assets-raw/sprites/effects/select-arrow.png
Normal file
BIN
core/assets-raw/sprites/effects/select-arrow.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 765 B |
|
|
@ -16,6 +16,7 @@ import mindustry.world.*;
|
|||
import static mindustry.Vars.*;
|
||||
|
||||
public class OverlayRenderer{
|
||||
private static final TextureRegion arrowRegion = Core.atlas.find("select-arrow");
|
||||
private static final float indicatorLength = 14f;
|
||||
private static final float spawnerMargin = tilesize*11f;
|
||||
private static final Rect rect = new Rect();
|
||||
|
|
@ -88,8 +89,12 @@ public class OverlayRenderer{
|
|||
Draw.rect(select.type.icon(Cicon.full), select.x(), select.y(), select.rotation() - 90);
|
||||
}
|
||||
|
||||
Lines.stroke(unitFade);
|
||||
Lines.square(select.x, select.y, select.hitSize() * 1.5f, Time.time * 2f);
|
||||
|
||||
for(int i = 0; i < 4; i++){
|
||||
float rot = i * 90f + 45f + (-Time.time / 3f) % 360f;
|
||||
float length = select.hitSize() * 1.5f + (unitFade * 2.5f);
|
||||
Draw.rect(arrowRegion, select.x + Angles.trnsx(rot, length), select.y + Angles.trnsy(rot, length), length / 1.9f, length / 1.9f, rot - 135f);
|
||||
}
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue