Skip to content

Feature: Uniformize Lifecycle Hooks #74

@GuilhermeF03

Description

@GuilhermeF03

Summary
The engine's lifecycle hooks should be uniformized, instead of each domain having a set of hooks specific to it.

Motivation
Right now, each domain (app, screen, scene manager) has its own set of lifecycle hooks(app and screen have onDispose, onSetup, while scene manager has onEnter, onExit). For end users, this can result in an unnecessary cognitive load.

Proposed Solution
To reduce the cognitive load, lifecycle hooks should be uniformized, into the following order:

  • onEnter -> setup logic
  • onUpdate -> iterative logic
  • onExit -> cleanup logic

Note

Each domain can also have specific hooks, such as onReady for scene manager, onPhysicsUpdate for nodes, onActive/onInactive for screens/apps.

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions