From 90ce729fe4aec934b15cb9d2edd43fa862340ec1 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 27 Nov 2023 00:34:01 +0100 Subject: [PATCH] Defined bullet class --- web/game.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/game.js b/web/game.js index b2efbdc..ae82f7e 100644 --- a/web/game.js +++ b/web/game.js @@ -25,6 +25,7 @@ let nextAttack; let time = 0; +let myBullet = new bullet(); // the function setup() is called once when the page is loaded function setup() { // create a canvas element and append it to the body @@ -136,6 +137,7 @@ function draw() { keyPressed(); life(); // draw background + myBullet.draw(); background(0, 0, 0, 100); if (!(lives == 0)) { // draw player @@ -176,4 +178,4 @@ function draw() { } } -} \ No newline at end of file +}