The bullet flies towards player using a class
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user