Skip to content

Commit 22823eb

Browse files
Create addScenePopHandler.md
1 parent 68133ea commit 22823eb

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## addScenePopHandler
2+
Registers a handler that runs whenever a scene is popped onto the scene stack.
3+
4+
## Parameters
5+
handler: the code that runs
6+
7+
## Example
8+
Set a new background color (blue) when the scene has popped.
9+
``` ts
10+
game.popScene();
11+
game.addScenePopHandler(() => {
12+
scene.setBackgroundColor(8);
13+
});
14+
```

0 commit comments

Comments
 (0)