Don't activate/deactivate/remove entities when not needed

This commit is contained in:
Matt Low 2020-01-31 21:31:33 +04:00
parent b389cb9c2b
commit cc53757a37

View File

@ -39,19 +39,25 @@ public final class Entity {
}
public void activate() {
active = true;
refresh();
if (!active) {
active = true;
refresh();
}
}
public void deactivate() {
active = false;
refresh();
if (active) {
active = false;
refresh();
}
}
public void remove() {
removed = true;
active = false;
refresh();
if (!removed) {
removed = true;
active = false;
refresh();
}
}
public Engine getEngine() {