Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Fix game initialization bugs. #123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,22 @@ Enemy.prototype.render = function() {
};

// Now write your own player class
var Player = function (){

}

// This class requires an update(), render() and
// a handleInput() method.

Player.prototype.update = function (){};
Player.prototype.render = function (){};

// Now instantiate your objects.

// Place all enemy objects in an array called allEnemies
// Place the player object in a variable called player
var allEnemies = [];

// Place the player object in a variable called player
var player = new Player();


// This listens for key presses and sends the keys to your
Expand Down