-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSonidos.pde
51 lines (45 loc) · 1.04 KB
/
Sonidos.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
void iniciarMusicaMenu() {
Menú = new SoundFile(this, "MenuCancion.mp3");
Menú.amp(0.3); // Volumen
Menú.rate(1); // Velocidad
Menú.loop();
MusicaPlaying = true;
}
void detenerMusicaMenu() {
if (MusicaPlaying) {
Menú.stop();
MusicaPlaying = false;
}
}
void iniciarMusicaJuego() {
if (juego == null) {
juego = new SoundFile(this, "MarioCanción.mp3");
juego.amp(0.3); // Volumen
juego.rate(1); // Velocidad
juego.loop();
}
}
void CoinRecogida() {
if(!CoinPlaying){
coin = new SoundFile(this, "SonidoCoin.mp3");
coin.amp(0.1); // Volumen
coin.rate(1); // Velocidad
coin.play();
CoinPlaying=true;
}
}
void ColisionSonido() {
if(!ColisionPlaying){
colision = new SoundFile(this, "SonidoExplosion.mp3");
colision.amp(0.3); // Volumen
colision.rate(1); // Velocidad
colision.play();
ColisionPlaying=true;
}
}
void click (){
click = new SoundFile(this, "SonidoGolpe.mp3");
click.amp(0.3); // Volumen
click.rate(1); // Velocidad
click.play();
}