sounds
This commit is contained in:
parent
82e3afcfe5
commit
b78310728e
@ -18,6 +18,7 @@ void keyPressed () {
|
||||
if(canjump) {
|
||||
jumpspeed =+ 31;
|
||||
canjump = false;
|
||||
jumpsound.play();
|
||||
}
|
||||
}
|
||||
} else if (iseditor) {
|
||||
|
||||
@ -3,6 +3,10 @@ SoundFile jumpsound;
|
||||
SoundFile deathsound;
|
||||
|
||||
void setup() {
|
||||
jumpsound = new SoundFile(this, "./sounds/jump.mp3");
|
||||
deathsound = new SoundFile(this, "./sounds/fail.mp3");
|
||||
|
||||
|
||||
size(800,800);
|
||||
frameRate(60);
|
||||
smooth(4);
|
||||
|
||||
@ -15,6 +15,7 @@ void generate_tiles() {
|
||||
} else {
|
||||
if (drawTriangleWithPlayerColission(level[i][0] -screenx, level[i][1], level[i][2], level[i][3])) {
|
||||
moveTilesBack(tilespeed);
|
||||
deathsound.play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BIN
game/sounds/fail.mp3
Normal file
BIN
game/sounds/fail.mp3
Normal file
Binary file not shown.
BIN
game/sounds/jump.mp3
Normal file
BIN
game/sounds/jump.mp3
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user