Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
HoangTran0410 committed Jul 30, 2023
1 parent 147fee7 commit 435372b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/game/gameObject/map/FogOfWar.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,19 @@ export default class FogOfWar {
TerrainType.BUSH,
]);

// draw obstacles in sight
// this.overlay.noErase();
// this.overlay.fill('#e00');
// obstaclesInSight.forEach(o => {
// this.overlay.beginShape();
// o.vertices.forEach(v => {
// let pos = this.game.camera.worldToScreen(v.x, v.y);
// this.overlay.vertex(pos.x, pos.y);
// });
// this.overlay.endShape(CLOSE);
// });
// this.overlay.erase();

// remove bushes that player is inside => player can see through that bushes
obstaclesInSight = obstaclesInSight.filter(
o =>
Expand Down

0 comments on commit 435372b

Please sign in to comment.