Skip to content

Commit

Permalink
feat: Expose current scene name on engine
Browse files Browse the repository at this point in the history
  • Loading branch information
eonarheim committed Jan 15, 2024
1 parent e1092c1 commit b7a5819
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/engine/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,14 @@ export class Engine<TKnownScenes extends string = any> implements CanInitialize,
return this.director.currentScene;
}


/**
* The current [[Scene]] being drawn and updated on screen
*/
public get currentSceneName(): string {
return this.director.currentSceneName;
}

/**
* The default [[Scene]] of the game, use [[Engine.goto]] to transition to different scenes.
*/
Expand Down

0 comments on commit b7a5819

Please sign in to comment.