Don't activate/deactivate/remove entities when not needed
This commit is contained in:
parent
b389cb9c2b
commit
cc53757a37
@ -39,20 +39,26 @@ public final class Entity {
|
||||
}
|
||||
|
||||
public void activate() {
|
||||
if (!active) {
|
||||
active = true;
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public void deactivate() {
|
||||
if (active) {
|
||||
active = false;
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public void remove() {
|
||||
if (!removed) {
|
||||
removed = true;
|
||||
active = false;
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
|
||||
public Engine getEngine() {
|
||||
return this.engine;
|
||||
|
Loading…
Reference in New Issue
Block a user