function toggleSound() {
  isSound = !isSound;

  const soundManager = document.querySelector('#soundManager');
  if(isSound) {
    soundManager.setAttribute("src", "assets/icons/ic_volume_up.svg");
  } else {
    soundManager.setAttribute("src", "assets/icons/ic_volume_off.svg");
  }
}
/**
 * Toggle sound and set sound icon
 *
 */
Toggle sound and set sound icon
Toggle sound and set sound icon
function toggleSound() {
  isSound = !isSound;
  const soundManager = document.querySelector('#soundManager');
  if(isSound) {
    soundManager.setAttribute("src", "assets/icons/ic_volume_up.svg");
  } else {
    soundManager.setAttribute("src", "assets/icons/ic_volume_off.svg");
  }
}
function toggleSound ( ) { isSound = ! isSound ; const soundManager = document . querySelector ( '#soundManager' ) ; if ( isSound ) { soundManager . setAttribute ( "src" , "assets/icons/ic_volume_up.svg" ) ; } else { soundManager . setAttribute ( "src" , "assets/icons/ic_volume_off.svg" ) ; } }
Toggle sound and set sound icon
Toggle sound and set sound icon