Skip to content

Commit

Permalink
Fixed update function
Browse files Browse the repository at this point in the history
  • Loading branch information
Acamaeda committed Oct 21, 2020
1 parent d096c3c commit 38391ca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# The Modding Tree changelog:

### v2.1.3.1 - 10/21/20
- Fixed the update function.

### v2.1.3 - 10/21/20
- gainMult and gainExp are now optional.
- Layer unlocking is now kept on reset.
Expand Down
2 changes: 1 addition & 1 deletion js/Demo/demoMod.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let modInfo = {

// Set your version in num and name
let VERSION = {
num: "2.1",
num: "2.1.3.1",
name: " We should have thought of this sooner!",
}

Expand Down
6 changes: 3 additions & 3 deletions js/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var gameEnded = false;

// Don't change this
const TMT_VERSION = {
tmtNum: "2.1.1",
tmtNum: "2.1.3.1",
tmtName: "We should have thought of this sooner!"
}

Expand Down Expand Up @@ -289,14 +289,14 @@ function gameLoop(diff) {
for (x = 0; x <= maxRow; x++){
for (item in TREE_LAYERS[x]) {
let layer = TREE_LAYERS[x][item].layer
if (layers[layer].update) layers[layer].update();
if (layers[layer].update) layers[layer].update(diff);
}
}

for (row in OTHER_LAYERS){
for (item in OTHER_LAYERS[row]) {
let layer = OTHER_LAYERS[row][item].layer
if (layers[layer].update) layers[layer].update();
if (layers[layer].update) layers[layer].update(diff);
}
}

Expand Down

0 comments on commit 38391ca

Please sign in to comment.