Skip to content

Commit

Permalink
Added celebration sound
Browse files Browse the repository at this point in the history
  • Loading branch information
noelking committed Apr 24, 2013
1 parent b906cfa commit d94d20d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Binary file modified penaltyshootout/.DS_Store
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,9 @@ function save() {
if (isScored(keeperLeft, keeperRight,
ballLeft, ballRight, keeperTop, keeperBottom,
ballTop, ballBottom)) {

rooneyKick.hide();
playGoal();
rooneyCelebrate();

if ( isGoal() ) {
Expand Down Expand Up @@ -345,4 +346,9 @@ function changeBallDirection(moveAmountValue, imageUrl) {
moveLeftAmount = moveAmountValue;
arrowDirectionImage.attr('src', imageUrl);
}
}

function playGoal() {
var audio = "<audio style='display: none' autoplay><source src='gooooaal.wav' type='audio/wav'/></audio>";
$("body").append(audio);
}

0 comments on commit d94d20d

Please sign in to comment.