We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4af8bc1 commit b4bdf37Copy full SHA for b4bdf37
1 file changed
docs/reference/game/eventContext.md
@@ -5,5 +5,14 @@ game.eventContext();
5
```
6
7
## Returns
8
-the scene's eventContext, which gets the EventContext class in control.
9
-
+the EventContext object for the active scene.
+
10
+## Example
11
+Manage the frame handlers for the scene and log the double the millisecond every 20 FPS.
12
+``` ts
13
+ const millis = control.millis();
14
+ game.eventContext().registerFrameHandler(20, () => {
15
+ const doubledMillis = millis * 2;
16
+ console.log(doubledMillis);
17
+ })
18
+```
0 commit comments