-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSoundManager.js
123 lines (95 loc) · 2.42 KB
/
SoundManager.js
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
//-----------------------------------------------------------------------------
// SoundManager
//
// The static class that plays sound effects defined in the database.
function SoundManager() {
throw new Error('This is a static class');
}
SoundManager.preloadImportantSounds = function() {
this.loadSystemSound(0);
this.loadSystemSound(1);
this.loadSystemSound(2);
this.loadSystemSound(3);
};
SoundManager.loadSystemSound = function(n) {
if ($dataSystem) {
AudioManager.loadStaticSe($dataSystem.sounds[n]);
}
};
SoundManager.playSystemSound = function(n) {
if ($dataSystem) {
AudioManager.playStaticSe($dataSystem.sounds[n]);
}
};
SoundManager.playCursor = function() {
this.playSystemSound(0);
};
SoundManager.playOk = function() {
this.playSystemSound(1);
};
SoundManager.playCancel = function() {
this.playSystemSound(2);
};
SoundManager.playBuzzer = function() {
this.playSystemSound(3);
};
SoundManager.playEquip = function() {
this.playSystemSound(4);
};
SoundManager.playSave = function() {
this.playSystemSound(5);
};
SoundManager.playLoad = function() {
this.playSystemSound(6);
};
SoundManager.playBattleStart = function() {
this.playSystemSound(7);
};
SoundManager.playEscape = function() {
this.playSystemSound(8);
};
SoundManager.playEnemyAttack = function() {
this.playSystemSound(9);
};
SoundManager.playEnemyDamage = function() {
this.playSystemSound(10);
};
SoundManager.playEnemyCollapse = function() {
this.playSystemSound(11);
};
SoundManager.playBossCollapse1 = function() {
this.playSystemSound(12);
};
SoundManager.playBossCollapse2 = function() {
this.playSystemSound(13);
};
SoundManager.playActorDamage = function() {
this.playSystemSound(14);
};
SoundManager.playActorCollapse = function() {
this.playSystemSound(15);
};
SoundManager.playRecovery = function() {
this.playSystemSound(16);
};
SoundManager.playMiss = function() {
this.playSystemSound(17);
};
SoundManager.playEvasion = function() {
this.playSystemSound(18);
};
SoundManager.playMagicEvasion = function() {
this.playSystemSound(19);
};
SoundManager.playReflection = function() {
this.playSystemSound(20);
};
SoundManager.playShop = function() {
this.playSystemSound(21);
};
SoundManager.playUseItem = function() {
this.playSystemSound(22);
};
SoundManager.playUseSkill = function() {
this.playSystemSound(23);
};