The bullet flies towards player using a class

This commit is contained in:
Sam
2023-11-29 14:22:06 +01:00
parent ee7f031775
commit 6273854a3d
2 changed files with 16 additions and 13 deletions

View File

@@ -115,9 +115,9 @@ function setup(){
function draw(){
keyPressed()
// clear the background with a transparent black color
background(0,0,0,10);
background(0,0,0,100);
myBullet.draw();
myBullet.update();
myBullet.update(playerPosX, playerPosY);
// draw a circle at the mouse position
circle(playerPosX, playerPosY, radius);
}