Created
May 19, 2014 18:53
-
-
Save dan-mi-sun/78d253a5c67c6463a4cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
console.log("Welcome to Duck Hunt!"); | |
// Behaviour for the play again link | |
$('#play-again').click(function(e) { | |
$("#game-over").toggle(); | |
new Game(); | |
}); | |
// Moves the crosshair with the mousepointer | |
// TODO: Add a mousemove event to the #game element... | |
$("#game").mousemove(function(event) { | |
$("#crosshair").css({"display": "block", "left": (event.pageX-30), "top": (event.pageY-30)}); | |
}); | |
// Kick-off a New Game | |
new Game(); | |
// TODO: Pass in a string to represent the difficulty level | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment