-
I know there is an @:add event for when components are added to the system, but what about one that runs when the entire system is re-activated? |
Beta Was this translation helpful? Give feedback.
Answered by
player-03
Dec 19, 2023
Replies: 1 comment
-
class MySystem extends System {
public function new() {
onActivate.add(() -> trace("MySystem activated"));
onDeactivate.add(() -> trace("MySystem deactivated"));
}
} Also note that once activated, the system will receive any pending |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
NitroPlum
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also note that once activated, the system will receive any pending
@:add
events all at once. This is meant to help you worry less about initialization order. You'll get the event regardless of whether the entity or the system is created first.