Audio Key Constants

Demonstrates organizing sound effect asset keys into a central constant object to ensure consistency and maintainability when referencing audio throughout a game.

1024 × 768
GitHub
const AUDIO_KEYS = {

    PLAYER_STEP: 'player-step',
    PLAYER_JUMP: 'player-jump',
    COIN: 'coin',
    KEY: 'key',
    STAR: 'star',
    WIN: 'win',
};

export default AUDIO_KEYS;

More in My First Game5 examples