function smackAlienTwo(e) {
    if(!this.isWhacked) {
    clickSound();
    score ++;
    }
    this.style.backgroundImage = "url(https://daithishan.github.io/spaceambush/assets/images/game-assets/alien-two-dizzy.svg)";
    this.style.pointerEvent = "none";
  setTimeout (()=> {
        this.parentNode.classList.remove('up');
    }, 500);

  setTimeout(() => {
    this.style.backgroundImage = "url(https://daithishan.github.io/spaceambush/assets/images/game-assets/alien-two.svg)";
    this.style.pointerEvent = "all";
  }, 510);
  scoreDisplay.textContent = score;
  return this.isWhacked = true;
}
// This function controls the user's ability to smack Alien Two
This function controls the user's ability to smack Alien Two
This function controls the user ' s ability to smack Alien Two
function smackAlienTwo(e) {
    if(!this.isWhacked) {
    clickSound();
    score ++;
    }
    this.style.backgroundImage = "url(https://daithishan.github.io/spaceambush/assets/images/game-assets/alien-two-dizzy.svg)";
    this.style.pointerEvent = "none";
  setTimeout (()=> {
        this.parentNode.classList.remove('up');
    }, 500);
  setTimeout(() => {
    this.style.backgroundImage = "url(https://daithishan.github.io/spaceambush/assets/images/game-assets/alien-two.svg)";
    this.style.pointerEvent = "all";
  }, 510);
  scoreDisplay.textContent = score;
  return this.isWhacked = true;
}
function smackAlienTwo ( e ) { if ( ! this . isWhacked ) { clickSound ( ) ; score ++ ; } this . style . backgroundImage = "url(https://daithishan.github.io/spaceambush/assets/images/game-assets/alien-two-dizzy.svg)" ; this . style . pointerEvent = "none" ; setTimeout ( ( ) => { this . parentNode . classList . remove ( 'up' ) ; } , 500 ) ; setTimeout ( ( ) => { this . style . backgroundImage = "url(https://daithishan.github.io/spaceambush/assets/images/game-assets/alien-two.svg)" ; this . style . pointerEvent = "all" ; } , 510 ) ; scoreDisplay . textContent = score ; return this . isWhacked = true ; }
This function controls the user's ability to smack Alien Two
This function controls the user ' s ability to smack Alien Two