xxxxxxxxxx
var bunkers = [];
function setup() {
createCanvas(windowWidth, windowHeight);
background(100);
for (var i = 0; i < 4; i++){
bunkers[i] = new Bunker(-50 + 270*i, i+400);
}
}
function draw() {
for (var i = 0; i < bunkers.length; i++){
bunkers[i].display();
}
}
function Bunker(x, y){
this.x = x;
this.y = y;
this.display = function(){
noStroke(1);
fill(18, 68, 14);
//scale(3);
rect(x + 213, y+152, 24, 60);
rect(x + 303, y+152, 25, 60);
rect(x + 236, y+128, 68, 60);
rect(x + 221, y+144, 16, 8);
rect(x + 228, y+136, 9, 8);
rect(x + 303, y+144, 16, 8);
rect(x + 303, y+136, 9, 8);
rect(x + 236, y+188, 18, 7);
rect(x + 287, y+188, 17, 7);
rect(x + 236, y+194, 10, 9);
rect(x + 295, y+194, 9, 9);
}
}