v2.0.2: fixed runaway memory usage with new action indicator
This commit is contained in:
@@ -96,10 +96,12 @@ public class ActionIndicator extends Tag {
|
|||||||
|
|
||||||
if (needsRefresh){
|
if (needsRefresh){
|
||||||
if (primaryVis != null) {
|
if (primaryVis != null) {
|
||||||
|
primaryVis.destroy();
|
||||||
primaryVis.killAndErase();
|
primaryVis.killAndErase();
|
||||||
primaryVis = null;
|
primaryVis = null;
|
||||||
}
|
}
|
||||||
if (secondVis != null){
|
if (secondVis != null){
|
||||||
|
secondVis.destroy();
|
||||||
secondVis.killAndErase();
|
secondVis.killAndErase();
|
||||||
secondVis = null;
|
secondVis = null;
|
||||||
}
|
}
|
||||||
@@ -112,11 +114,11 @@ public class ActionIndicator extends Tag {
|
|||||||
add(secondVis);
|
add(secondVis);
|
||||||
}
|
}
|
||||||
|
|
||||||
needsRefresh = true;
|
|
||||||
setColor(action.indicatorColor());
|
setColor(action.indicatorColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
layout();
|
layout();
|
||||||
|
needsRefresh = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Dungeon.hero.ready){
|
if (!Dungeon.hero.ready){
|
||||||
|
|||||||
Reference in New Issue
Block a user