xxxxxxxxxx
ArrayList < Hill > landscape = new ArrayList < Hill > ();
int tick;
void setup() {
fullScreen();
background(60);
}
void draw() {
noCursor();
fill(60, 120, 240);
stroke(255);
translate(width/2, height/2);
rotate(tick / (16*PI));
arc(0, 0, 240, 240, 0, tick / (32*PI) % TWO_PI, PIE);
popMatrix();
for (Hill hill: landscape)
hill.render();
stroke(51, 75, 255);
strokeWeight(20);
fill(60, 120, 240, 50);
stroke(255, 50);
strokeWeight(4);
ellipse(mouseX, mouseY, sin(tick / 45) * 24 + 26, sin(tick / 45) * 24 + 26);
pushMatrix();
tick++;
fill(60, 20);
rect(0, 0, width, height);
}
void mouseClicked() {
landscape.add(new Hill(mouseX, mouseY));
}