- scoreboard.countdown(60)—starts the countdown in the game with the number
of seconds supplied. If no time is specified, then 60 seconds will be used.
If the countdown section of the scoreboard is not shown already, this will
show it. - scoreboard.showCountdown()—shows the countdown section of the scoreboard.
- scoreboard.hideCountdown()—hides the countdown section of the scoreboard.
- scoreboard.stopCountdown()—stops the countdown from counting any more.
- scoreboard.startCountdown()—starts the countdown counting.
- scoreboard.resetCountdown(60)—resets the countdown to the specified number
of seconds. - scoreboard.getTimeRemaining()—returns the number of seconds left in the game.
- scoreboard.onTimeExpired('Time expired message')—sets the message to be shown
when time expires. - scoreboard.onTimeExpired(function())«{ ... }»—if a function is supplied to the
onTimeExpired() method, the function will be called when time runs out.
A2.5 Sounds.js
The Sounds.js JavaScript library contains the bare minimum of sounds for
use in games. Full, up-to-date documentation is available at https://github.com/
eee-c/Sounds.js.
To use the Sounds.js library, it must be sourced in a