Skip to content
Snippets Groups Projects
Commit 7455ccd5 authored by Florian Kaufmann's avatar Florian Kaufmann
Browse files

changed styles once more

parent bfe57e81
1 merge request!10Added sounds & the ability to play them
/**
* Loads, manages & plays sound files
*/
/**
*
* @param {"defaultError" | "defaultSuccess" | "join" | "leave" | "roundOver" | "selectedWord" | "timeLow" | "win" | "wtfError" | "yourTurn"} name
*/
export default function playSound(name) {
sounds[name].currentTime = 0.0;
sounds[name].play();
}
export default class Sounds {
/**
*
* @param {"defaultError" | "defaultSuccess" | "join" | "leave" | "roundOver" | "selectedWord" | "timeLow" | "win" | "wtfError" | "yourTurn"} name
*/
static playSound(name) {
sounds[name].currentTime = 0.0;
sounds[name].play();
}
}
/** @type {{[key: string]: HTMLAudioElement}} */
let sounds = {};
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment