Skip to content

Commit b4bdf37

Browse files
Update eventContext.md
1 parent 4af8bc1 commit b4bdf37

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

docs/reference/game/eventContext.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,14 @@ game.eventContext();
55
```
66

77
## Returns
8-
the scene's eventContext, which gets the EventContext class in control.
9-
8+
the EventContext object for the active scene.
9+
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

Comments
 (0)