Remove reset on WorldLoadEvent

This actually works, according to playtesting, unlike the last PR
This commit is contained in:
NiChrosia
2021-05-14 09:29:33 -05:00
parent bf8a71386b
commit f07e42fdad
2 changed files with 22 additions and 13 deletions

View File

@@ -59,6 +59,19 @@ public class HudUi {
int maxwave;
int coreamount;
public void reset(){
bars.each(bar -> {
weapon = new Table();
core = new Table();
wave = new Table();
waveTable = new Table();
bar.visible = false;
bar.clear();
bar.remove();
});
}
public Unit getUnit(){
Seq<Unit> units = Groups.unit.intersect(Core.input.mouseWorldX(), Core.input.mouseWorldY(), 4, 4);
if(units.size <= 0) return player.unit();