Skip to content

Commit

Permalink
Call Update on objects based off status variable
Browse files Browse the repository at this point in the history
Using switch case for future use (animated finish screen most likely)
  • Loading branch information
tysonzero committed Sep 12, 2013
1 parent e8ae95d commit bca2419
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ var game = {

//run every 1/60th of a second
run:function() {
if (!pause.enabled && !finish.enabled) {
this.update();
}
this.update();
this.draw();
},

//logic
update:function() {
theKey.update();
scoreboard.update();
switch(this.status) {
case "play"
theKey.update();
scoreboard.update();
},

//drawing to screen
Expand Down

0 comments on commit bca2419

Please sign in to comment.