Added comments
This commit is contained in:
@@ -107,6 +107,7 @@ function setup(){
|
||||
createCanvas(1250, 600);
|
||||
frameRate(244);
|
||||
// disable the outline of shapes
|
||||
//declare the bullet with its variables
|
||||
myBullet = new bullet(playerPosX, playerPosY, 10, 20);
|
||||
|
||||
noStroke();
|
||||
@@ -117,7 +118,9 @@ function draw(){
|
||||
keyPressed()
|
||||
// clear the background with a transparent black color
|
||||
background(0,0,0,100);
|
||||
//draw the bullet
|
||||
myBullet.draw();
|
||||
//update de variabel playerPosX en playerPosY en de terugkomende variabelen hit en shot
|
||||
let { hit, shot } = myBullet.update(playerPosX, playerPosY);
|
||||
// draw a circle at the mouse position
|
||||
circle(playerPosX, playerPosY, radius);
|
||||
|
Reference in New Issue
Block a user