Can draw green dot with bullet class 🤬
This commit is contained in:
@@ -72,8 +72,7 @@ let playerPosX = 500;
|
||||
let playerPosY = 300;
|
||||
let bullets = [];
|
||||
let playerSpeed = 5;
|
||||
let radius = 20;
|
||||
let myBullet = new bullet();
|
||||
let radius = 40;
|
||||
|
||||
async function Movementloop() {
|
||||
if (booleanArray[1]) {
|
||||
@@ -107,12 +106,15 @@ function setup(){
|
||||
createCanvas(1250, 600);
|
||||
frameRate(244);
|
||||
// disable the outline of shapes
|
||||
myBullet = new bullet();
|
||||
|
||||
noStroke();
|
||||
myBullet(playerPosX, playerPosY, radius, 5);
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
||||
|
Reference in New Issue
Block a user