diff --git a/webdev/game.js b/webdev/game.js index ef2ef3d..9cc3241 100644 --- a/webdev/game.js +++ b/webdev/game.js @@ -106,7 +106,7 @@ function setup(){ createCanvas(1250, 600); frameRate(244); // disable the outline of shapes - myBullet = new bullet(); + myBullet = new bullet(playerPosX, playerPosY, 10, 20); noStroke(); } @@ -114,10 +114,10 @@ function setup(){ // the function draw() is called every frame function draw(){ keyPressed() - myBullet.draw(playerPosX, playerPosY, 10, 5); // clear the background with a transparent black color background(0,0,0,10); - + myBullet.draw(); + myBullet.update(); // draw a circle at the mouse position circle(playerPosX, playerPosY, radius); }