Skip to content

Commit

Permalink
🐛 fix(game.js): remove unnecessary isPassed() method as it is not bei…
Browse files Browse the repository at this point in the history
…ng used in the codebase
  • Loading branch information
romantech committed Feb 4, 2024
1 parent d0d724a commit 9508ece
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,13 @@ class Game {
case 'obstacle': {
this.toggleButtonActive(true);
this.failed();
break;
return; // checkCollision() 반복 호출 종료
}
case 'coin': {
this.audio.playEffect('coin');
this.score.add(entity.point);
entity.touched = true;
entity.hide(entity);
break;
}
}
}
Expand All @@ -160,10 +159,6 @@ class Game {

return isHorizontalOverlap && isVerticalOverlap;
}

isPassed(marioRect, obstacleRect) {
return marioRect.left > obstacleRect.right; // 마리오가 장애물 넘었는지 확인
}
}

export default Game;

0 comments on commit 9508ece

Please sign in to comment.