Skip to content

Commit

Permalink
chore: Remove unused sprite from goal
Browse files Browse the repository at this point in the history
  • Loading branch information
johnedvard committed Aug 21, 2022
1 parent 3b0c4da commit 343a0e0
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/Goal.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { GOAL_COLLISION } from './gameEvents';

export class Goal {
level;
sprite;
scale = 1;
width = 60;
height = 32;
Expand All @@ -24,9 +23,6 @@ export class Goal {
update() {
if (this.hasVanished) return;
this.checkCollision();
if (this.sprite) {
this.sprite.update();
}
}
render(ctx) {
if (!ctx || this.hasVanished) return;
Expand All @@ -47,9 +43,6 @@ export class Goal {
Math.PI * 2
);
ctx.stroke();
if (this.sprite) {
this.sprite.render();
}
}

startVanishing() {
Expand All @@ -62,7 +55,6 @@ export class Goal {
}
}
checkCollision() {
const player = this.level.player;
if (
isBoxCollision(
{
Expand Down

0 comments on commit 343a0e0

Please sign in to comment.