v2.0.2: fixed runaway memory usage with new action indicator

This commit is contained in:
Evan Debenham
2023-04-13 11:47:52 -04:00
parent 99195f0d57
commit 9ff36ae102

View File

@@ -96,10 +96,12 @@ public class ActionIndicator extends Tag {
if (needsRefresh){
if (primaryVis != null) {
primaryVis.destroy();
primaryVis.killAndErase();
primaryVis = null;
}
if (secondVis != null){
secondVis.destroy();
secondVis.killAndErase();
secondVis = null;
}
@@ -112,11 +114,11 @@ public class ActionIndicator extends Tag {
add(secondVis);
}
needsRefresh = true;
setColor(action.indicatorColor());
}
layout();
needsRefresh = false;
}
if (!Dungeon.hero.ready){