Skip to content

Commit

Permalink
adjusted image onload function
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnM89 committed Jul 23, 2024
1 parent 449e639 commit 5fa92df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class Game extends Canvas {
this.staminaLog = () => console.log(`+10 sec`);
this.eventListener();
//onload method because the script runs before the images is loaded
this.img1.onload = () => this.drawMap();
// this.img2.onload = () => this.drawMap();
this.img2.onload = () => this.drawMap();
// this.img1.onload = () => this.drawMap();


}
Expand Down

0 comments on commit 5fa92df

Please sign in to comment.