Behavior lifecycle: On enable, On disable and On destroy events (#42)
game-maker / suite (push) Successful in 7m29s
game-maker / suite (push) Successful in 7m29s
Order per instance: On start -> On enable -> On update ... -> On disable -> On destroy. On enable fires right after On start and whenever the behavior comes back on (itself and its parents); On disable in the frame it goes off, the instance stays frozen. On destroy fires when the entity leaves the world (Destroy node, child of a destroyed object) and when the world is torn down on stop/restart, preceded by On disable if still on. A new On start node added while playing still does not fire for a running instance (kept as is, documented in the wiki). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
f0673d1957
commit
6141d07d4f
8 files changed
+203
-8
No files matched your search
@@ -677,7 +677,10 @@ function eqNamesakes(): Record<string, Value> {
|
||||
const EVENT_NODES: Record<string, string> = {
|
||||
BehaviorStart: 'nested-behavior.test.ts',
|
||||
OnStart: 'graph.test.ts',
|
||||
OnEnable: 'behavior-events.test.ts',
|
||||
OnUpdate: 'graph.test.ts',
|
||||
OnDisable: 'behavior-events.test.ts',
|
||||
OnDestroy: 'behavior-events.test.ts',
|
||||
OnKeyDown: 'behavior-events.test.ts',
|
||||
OnKeyUp: 'behavior-events.test.ts',
|
||||
OnKeyHeld: 'behavior-events.test.ts',
|
||||
|
||||
Reference in new issue
Block a user