sun
This commit is contained in:
parent
92a6ace93b
commit
0db9e72d8d
23
game/map.pde
23
game/map.pde
@ -2,6 +2,7 @@ int screenx = 0;
|
|||||||
|
|
||||||
// level generation
|
// level generation
|
||||||
void generate_tiles() {
|
void generate_tiles() {
|
||||||
|
stroke(0);
|
||||||
for (int i = 0; i < level.length; i++ ) {
|
for (int i = 0; i < level.length; i++ ) {
|
||||||
rect(level[i][0]-screenx, level[i][1], level[i][2], level[i][3]);
|
rect(level[i][0]-screenx, level[i][1], level[i][2], level[i][3]);
|
||||||
}
|
}
|
||||||
@ -35,25 +36,29 @@ void drawBackground() {
|
|||||||
color darksand = color(232, 177, 120);
|
color darksand = color(232, 177, 120);
|
||||||
color sea = color(51, 169, 255);
|
color sea = color(51, 169, 255);
|
||||||
color seaend = color(146, 254, 255);
|
color seaend = color(146, 254, 255);
|
||||||
|
color sun = color(247, 178, 2);
|
||||||
|
|
||||||
// sky
|
// sky
|
||||||
background(sky);
|
background(sky);
|
||||||
// sea
|
// sea
|
||||||
// for(int y = 400; y < 650; y++){
|
for(int y = 400; y < 650; y++){
|
||||||
// float inter = map(y, 400, 650, 0, 1);
|
float inter = map(y, 400, 650, 0, 1);
|
||||||
// color c = lerpColor(sea, seaend, inter);
|
color c = lerpColor(sea, seaend, inter);
|
||||||
// stroke(c);
|
stroke(c);
|
||||||
// line(0, y, width, y);
|
line(0, y, width, y);
|
||||||
// noStroke();
|
noStroke();
|
||||||
// }
|
}
|
||||||
fill(sea);
|
|
||||||
quad(0, 400, width, 400, width, 650, 0, 650);
|
|
||||||
// Beach
|
// Beach
|
||||||
fill(sand);
|
fill(sand);
|
||||||
quad(0, 650, width, 650, width, height, 0, height);
|
quad(0, 650, width, 650, width, height, 0, height);
|
||||||
// Player stands on this
|
// Player stands on this
|
||||||
fill(darksand);
|
fill(darksand);
|
||||||
quad(0, 0.850*height, width, 0.850*height, width, height, 0, height);
|
quad(0, 0.850*height, width, 0.850*height, width, height, 0, height);
|
||||||
|
//sun
|
||||||
|
fill(sun);
|
||||||
|
ellipse(130, 100, 70, 70);
|
||||||
|
|
||||||
|
|
||||||
fill(0);
|
fill(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user