From 6feaa8e08ebbb134605c0edaa5f5e10ccd959f07 Mon Sep 17 00:00:00 2001 From: sam Date: Tue, 5 Dec 2023 13:23:09 +0100 Subject: [PATCH 1/2] Added bullet original pos return paramater --- web/game.js | 2 +- web/js/basicbullet.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/game.js b/web/game.js index 04e46f9..1f220db 100644 --- a/web/game.js +++ b/web/game.js @@ -178,7 +178,7 @@ function draw() { bullets.forEach(myBullet => { //zolang mybullet bestaat blijft hij drawen en updaten - ({ hit, shot, isOffScreen } = myBullet.update(playerPosX, playerPosY)); + ({ hit, shot, isOffScreen, originalPos } = myBullet.update(playerPosX, playerPosY)); myBullet.draw(); if (isOffScreen == true) { diff --git a/web/js/basicbullet.js b/web/js/basicbullet.js index b69e6c2..1ba2506 100644 --- a/web/js/basicbullet.js +++ b/web/js/basicbullet.js @@ -49,8 +49,9 @@ class bullet { shot = false; } let isOffScreen = this.projectile.x < 0 || this.projectile.x > width || this.projectile.y < 0 || this.projectile.y > height; + let originalPos = this.projectile.x == this.targetx || this.projectile.y == this.targety; - return { hit, shot, isOffScreen}; + return { hit, shot, isOffScreen, originalPos}; } } \ No newline at end of file From 5b21775062b3267ac8e0346193f2e64b5939a566 Mon Sep 17 00:00:00 2001 From: sam Date: Tue, 5 Dec 2023 14:25:43 +0100 Subject: [PATCH 2/2] File creation + navbar update --- docs/.pages | 4 +++- docs/documentatie/presentatie.md | 0 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 docs/documentatie/presentatie.md diff --git a/docs/.pages b/docs/.pages index ba8b1a5..f7cb296 100644 --- a/docs/.pages +++ b/docs/.pages @@ -13,4 +13,6 @@ nav: - Game idee: "brainstorm/game idee" - Taskflow en wireflow: "brainstorm/task flow" - Storyboard: "brainstorm/storyboard" - - to-do list: "brainstorm/to-do list" \ No newline at end of file + - to-do list: "brainstorm/to-do list" + - 📚 Documentatie: + - Presentatie: documentatie/presentatie.md \ No newline at end of file diff --git a/docs/documentatie/presentatie.md b/docs/documentatie/presentatie.md new file mode 100644 index 0000000..e69de29