The base game class
springroll.pbskids.Learningapp
[showTray=false]
app
springroll.Application
The application reference
[showTray=false]
Boolean
optional
Show the documentation at init or false (dev build only!)
_handleErrorerror
Handle errors
error
Error
The error to handle
[description]
_onCalledapi
Handler when an api is called
api
String
The name of the API method called
_specTrackapi
[extraArgs]
Generic method to track an event based on the spec, the arguments mirror the arguments in the event spec.
api
String
The name of the api
[extraArgs]
optional
multiple
The Additional arguments
_startFeedbackapi
Basic method for starting a feedback or instruction
api
String
The event method to call
_startFeedbackapi
description
identifier
mediaType
totalDuration
Basic method for starting a feedback or instruction
_trackapi
[input]
[round]
Generic method to track an event based on the spec, the arguments mirror the arguments in the event spec.
addMapeventDictionary
The map of API event name overrides
eventDictionary
Object
The collection of game-specific APIs, this is a map of the eventCode to the name of the API method
clickPlaycoordinates
When a user clicks or taps on the play button to start the game.
coordinates
Object
The coordinates object
x
Int
The x position clicked or tapped
y
Int
The y position clicked or tapped
stage_width
Int
The stage width
stage_height
Int
The stage height
endGame[exitType]
Override for the end game event
[exitType]
String
optional
The exit type for certain games
gameTimeGet the amount of time since the start of the game
The time since the beginning of the game in milliseconds
pollTimeralias
Check the current progress of a timer, this will not destory the timer
alias
String
The unique alias for this timer
The timer in milliseconds
removeTimeralias
This will clean-up and discard the timer and it can't be used again.
alias
String
The unique alias for this timer
requiresapi
Require that an api has been called
api
String
The names of the method or API call
If the api was called before
startCorrectFeedbackdescription
identifier
mediaType
total_duration
Start the correct feedback event
startIncorrectFeedbackdescription
identifier
mediaType
total_duration
Start the incorrect feedback
startInstructiondescription
identifier
mediaType
total_duration
Start the system initiated instruction
startTimeralias
Convenience function for measuring the duration which is common for many events. These timers respect the application being paused and should be use instead of implementing Date.now() or some other Date-based method.
alias
String
A unique alias for this timer
stopTimeralias
Stop a timer and get the final duration to send with an event. This will clean-up and discard the timer and it can't be used again.
alias
String
The unique alias for this timer
The timer in milliseconds
calledAn api method was called, this happens before any validation
api
String
The name of the api method called