-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSoundControl.gd
63 lines (52 loc) · 1.26 KB
/
SoundControl.gd
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
52
53
54
55
56
57
58
59
60
61
62
63
extends Node
var track
enum {NOTHING, CENTRO, DUEL, NOBLE, FAVELA}
func playsaved():
track = NOTHING
$Music/BackTrack.stop()
if get_parent().tmpMusic == 1:
centro()
elif get_parent().tmpMusic == 2:
duel()
elif get_parent().tmpMusic == 3:
noble()
elif get_parent().tmpMusic == 4:
favela()
#add mais quando surgirem novas musicas
get_parent().tmpMusic = 0
func centro():
if track == CENTRO:
pass
elif track != CENTRO:
track = CENTRO
var temp = load("res://Audio/bensound-hipjazz.ogg")
$Music/BackTrack.pitch_scale = 0.7
$Music/BackTrack.stream = temp
$Music/BackTrack.play()
func duel():
if track == DUEL:
pass
elif track != DUEL:
track = DUEL
var temp = load("res://Audio/bensound-theduel.ogg")
$Music/BackTrack.pitch_scale = 0.7
$Music/BackTrack.stream = temp
$Music/BackTrack.play()
func noble():
if track == NOBLE:
pass
elif track != NOBLE:
track = NOBLE
var temp = load("res://Audio/bensound-bossanova.ogg")
$Music/BackTrack.pitch_scale = 1
$Music/BackTrack.stream = temp
$Music/BackTrack.play()
func favela():
if track == FAVELA:
pass
elif track != FAVELA:
track = FAVELA
var temp = load("res://Audio/funk.ogg")
$Music/BackTrack.pitch_scale = 0.95
$Music/BackTrack.stream = temp
$Music/BackTrack.play()