finish
This commit is contained in:
parent
46cb3f22c4
commit
eafd6f3d92
@ -2,8 +2,17 @@
|
|||||||
|
|
||||||
boolean iseditorModeRect = true;
|
boolean iseditorModeRect = true;
|
||||||
boolean iseditorModeSpike = false;
|
boolean iseditorModeSpike = false;
|
||||||
|
float volume = 0.2;
|
||||||
|
|
||||||
void keyPressed () {
|
void keyPressed () {
|
||||||
|
if (key == 'm') {
|
||||||
|
if (volume == 0.2) {
|
||||||
|
volume = 0;
|
||||||
|
} else {
|
||||||
|
volume = 0.2;
|
||||||
|
}
|
||||||
|
gamesoundtrack.amp(volume);
|
||||||
|
}
|
||||||
if (ismenu) {
|
if (ismenu) {
|
||||||
} else if (isgame) {
|
} else if (isgame) {
|
||||||
if (key == CODED) {
|
if (key == CODED) {
|
||||||
|
|||||||
@ -73,7 +73,14 @@ void mainMenu() {
|
|||||||
}
|
}
|
||||||
fill(0);
|
fill(0);
|
||||||
textSize(40);
|
textSize(40);
|
||||||
|
textAlign(CENTER);
|
||||||
text("Exit", 50, 110);
|
text("Exit", 50, 110);
|
||||||
|
|
||||||
|
// Text in corner
|
||||||
|
textAlign(LEFT);
|
||||||
|
fill(0);
|
||||||
|
textSize(20);
|
||||||
|
text("m - mute audio", 10, 700);
|
||||||
}
|
}
|
||||||
|
|
||||||
void menuButton() {
|
void menuButton() {
|
||||||
@ -90,6 +97,7 @@ void menuButton() {
|
|||||||
}
|
}
|
||||||
fill(0);
|
fill(0);
|
||||||
textSize(40);
|
textSize(40);
|
||||||
|
textAlign(CENTER);
|
||||||
text("Exit", 50, 50+10);
|
text("Exit", 50, 50+10);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,6 +108,14 @@ void mapEditor() {
|
|||||||
generate_editor_tiles();
|
generate_editor_tiles();
|
||||||
// generate_tiles();
|
// generate_tiles();
|
||||||
menuButton();
|
menuButton();
|
||||||
|
|
||||||
|
// Texts at Top
|
||||||
|
textAlign(RIGHT);
|
||||||
|
textSize(20);
|
||||||
|
text("SPACE - Toggle between rect and triangle", 790, 50);
|
||||||
|
text("Left Click - Place block", 790, 70);
|
||||||
|
text("Right Click - Delete Block", 790, 90);
|
||||||
|
text("Arrows - Move right and left", 790, 110);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rectangle with editor colission
|
// Rectangle with editor colission
|
||||||
|
|||||||
11
game/map.pde
11
game/map.pde
@ -63,6 +63,7 @@ void drawBackground() {
|
|||||||
color sky = color(94, 218, 252);
|
color sky = color(94, 218, 252);
|
||||||
color sand = color(235, 218, 174);
|
color sand = color(235, 218, 174);
|
||||||
color darksand = color(232, 177, 120);
|
color darksand = color(232, 177, 120);
|
||||||
|
color darkersand = color(166, 110, 51);
|
||||||
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);
|
color sun = color(247, 178, 2);
|
||||||
@ -93,9 +94,12 @@ void drawBackground() {
|
|||||||
drawPalm(300, 700);
|
drawPalm(300, 700);
|
||||||
drawPalm(400, 700);
|
drawPalm(400, 700);
|
||||||
|
|
||||||
fill(darksand);
|
fill(0, 200);
|
||||||
point(500, 770);
|
stroke(darkersand);
|
||||||
|
for (int i = 0; i < 500; i++) {
|
||||||
|
point(random(0, width), random(700, 800));
|
||||||
|
}
|
||||||
|
stroke(0);
|
||||||
fill(0);
|
fill(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +116,6 @@ void drawPalm(int startingpoint_x, int startingpoint_y) {
|
|||||||
int offset = 8;
|
int offset = 8;
|
||||||
PVector endpoint = new PVector(startingpoint_x, startingpoint_y - randomnumber * offset);
|
PVector endpoint = new PVector(startingpoint_x, startingpoint_y - randomnumber * offset);
|
||||||
for (int i = 0; i <= randomnumber; i++) {
|
for (int i = 0; i <= randomnumber; i++) {
|
||||||
|
|
||||||
triangle(endpoint.x+i*schwanken, endpoint.y+i*offset, endpoint.x+10+i*schwanken, endpoint.y+10+i*offset, endpoint.x+20+i*schwanken, endpoint.y+i*offset);
|
triangle(endpoint.x+i*schwanken, endpoint.y+i*offset, endpoint.x+10+i*schwanken, endpoint.y+10+i*offset, endpoint.x+20+i*schwanken, endpoint.y+i*offset);
|
||||||
}
|
}
|
||||||
fill(93, 133, 47);
|
fill(93, 133, 47);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user