Moved files to other folder
This commit is contained in:
32
webdev/game.js
Normal file
32
webdev/game.js
Normal file
@@ -0,0 +1,32 @@
|
||||
let Playerposx = 500;
|
||||
let Playerposy = 300;
|
||||
|
||||
if (booleanArray) {
|
||||
if (booleanArray[1]) {
|
||||
Playerposx += 1;}
|
||||
if (booleanArray[3]) {
|
||||
Playerposx -= 1;}
|
||||
if (booleanArray[0]) {
|
||||
Playerposy += 1;}
|
||||
if (booleanArray[2]) {
|
||||
Playerposy -= 1;}
|
||||
|
||||
}
|
||||
|
||||
// the function setup() is called once when the page is loaded
|
||||
function setup(){
|
||||
// create a canvas element and append it to the body
|
||||
createCanvas(1250, 600);
|
||||
|
||||
// disable the outline of shapes
|
||||
noStroke();
|
||||
}
|
||||
|
||||
// the function draw() is called every frame
|
||||
function draw(){
|
||||
// clear the background with a transparent black color
|
||||
background(0,0,0,10);
|
||||
|
||||
// draw a circle at the mouse position
|
||||
circle(Playerposx, Playerposy, 50);
|
||||
}
|
Reference in New Issue
Block a user