Skip to content

Commit

Permalink
Merge branch 'pr/1681' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionel Laské committed Dec 23, 2024
2 parents a8202f4 + 10fc208 commit 6445b2c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Activity Description opening downwards in Journal #1407
- Listview Popup increasing page length and opening downwards for lower icons #1674
- Vertical bar are broken in Chart/Gears activities on Windows #1646
- In the activity of food chain, the picture of frog shows incomplete #1191

## [1.8.0] - 2024-04-10
### Added
Expand Down
12 changes: 12 additions & 0 deletions activities/FoodChain.activity/playgame.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,11 @@ enyo.kind({

// Move frog
this.frog.unDraw(this.ctx);
// Undraw and redraw all the rocks
for (var i = 0; i < this.rocks.length; i++) {
this.rocks[i].unDraw(this.ctx); // Clear the rock from the canvas
this.rocks[i].draw(this.ctx); // Redraw the rock in its original position
}
if (newHeading != this.frog.getHeading()) {
// Just change heading
this.frog.setHeading(newHeading);
Expand Down Expand Up @@ -446,6 +451,8 @@ enyo.kind({
currentfly.setY(dummyfly.getY());
currentfly.setHeading(dummyfly.getHeading());
currentfly.draw(this.ctx);
this.frog.unDraw(this.ctx);
this.frog.draw(this.ctx);
currentfly.playSound();
},

Expand Down Expand Up @@ -624,6 +631,11 @@ enyo.kind({
this.frog.useImage(0);
this.frog.draw(this.ctx);
this.frog.alive = true;
// Undraw and redraw all the rocks
for (var i = 0; i < this.rocks.length; i++) {
this.rocks[i].unDraw(this.ctx); // Clear the rock from the canvas
this.rocks[i].draw(this.ctx); // Redraw the rock in its original position
}
return;
}

Expand Down

0 comments on commit 6445b2c

Please sign in to comment.