You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,35 @@ The Container supports custom interface elements for managing things like toggle
53
53
|**musicButton**| Toggles only music mute |
54
54
|**pauseButton**| Plays and pause the game |
55
55
56
+
### Play Options
57
+
The `openPath` method of the Container provides a mechanism for providing options directly to the game, called
58
+
`playOptions`:
59
+
60
+
```javascript
61
+
var container =newspringroll.Container('#game');
62
+
container.openPath('game.html', {
63
+
playOptions: {
64
+
difficulty:7,
65
+
theme:'blue'
66
+
}
67
+
});
68
+
```
69
+
70
+
In a SpringRoll Application, the Container Client Plugin [mirrors this data directly onto the object](https://github.com/SpringRoll/SpringRoll/blob/master/src/container-client/ContainerClientPlugin.js#L316).
71
+
Once the application finishes its `init` process, this data will be available directly on the application instance:
0 commit comments