Add smoe coments
This commit is contained in:
parent
0281d19f10
commit
60240bb483
@ -4,17 +4,20 @@ let packageClaim;
|
||||
let going = false;
|
||||
let forklift;
|
||||
|
||||
// This runs once at start
|
||||
function setup() {
|
||||
createCanvas(500, 500).parent('canvas');
|
||||
|
||||
frameRate(30);
|
||||
|
||||
createMagazineLayout();
|
||||
|
||||
select('#button').mousePressed(deliver);
|
||||
|
||||
// Create a forklift instance
|
||||
forklift = new Forklift(sections['START'].x, sections['START'].y);
|
||||
}
|
||||
|
||||
// This runs every frame
|
||||
function draw() {
|
||||
background(64);
|
||||
drawMagazine();
|
||||
@ -32,6 +35,7 @@ function drawMagazine() {
|
||||
noFill();
|
||||
stroke(220);
|
||||
strokeWeight(10);
|
||||
// Draw all the roads in the magazine
|
||||
for (let road of roads) {
|
||||
line(
|
||||
sections[road[0]].x,
|
||||
@ -42,6 +46,7 @@ function drawMagazine() {
|
||||
}
|
||||
noStroke();
|
||||
textAlign(CENTER, CENTER);
|
||||
// Draw all sections in the magazine
|
||||
for (let section of Object.keys(sections)) {
|
||||
if (section === 'START') {
|
||||
fill(80);
|
||||
|
Loading…
Reference in New Issue
Block a user