Created
November 20, 2017 06:54
-
-
Save writingdeveloper/0c834b4ab963e70cca87607c8ee0e8a4 to your computer and use it in GitHub Desktop.
app.js
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
// Enemies our player must avoid | |
var Enemy = function(x, y, speed) { | |
this.x = x; | |
this.y = y; | |
this.speed = speed; | |
// The sprite continuously crops and displays the image. | |
this.sprite = 'images/enemy-bug.png'; | |
}; | |
var Enemy_Rock = function(x, y, speed) { | |
this.x = x; | |
this.y = y; | |
this.speed = speed; | |
// The sprite continuously crops and displays the image. | |
this.sprite = 'images/Rock.png'; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment