forked from wwwtyro/Astray
-
Notifications
You must be signed in to change notification settings - Fork 1
/
atmosphere.js
86 lines (85 loc) · 6.4 KB
/
atmosphere.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
function getAtmosphere(atmosphere, sound, item) {
if(atmosphere == "horror" && sound == "horror") {
switch(item) {
case "font-family": return "scaryFont"; break;
case "chest_items": return ["zoom_out", "jump_scare", "move_to_start", "rotate_maze", "light_darker", "increase_time", "decrease_time", "random_teleportation"]; break;
case "chest_probabilities": return [0.0, 0.0, 0.00, 0, 0.0, 1, 0, 0]; break;
case "chest_texture": return THREE.ImageUtils.loadTexture('./assets/chest.jpg'); break;
case "head_texture": return THREE.ImageUtils.loadTexture('./assets/hair.jpg'); break;
case "player_texture": return THREE.ImageUtils.loadTexture('./assets/cloak.jpg'); break;
case "ground_texture": return THREE.ImageUtils.loadTexture('./assets/dark_ground2.jpg'); break;
case "wall_texture": return THREE.ImageUtils.loadTexture('./assets/hedge.jpg'); break;
case "background_music": return "assets/background.mp3"; break;
case "death_sound": return "assets/gong.wav"; break;
case "end_sound": return "assets/ghastlyboom.mp3"; break;
case "step_sound": return "assets/10-2 closeEnd.wav"; break;
case "light_intensity": return 0.5; break;
case "enemy_texture": return THREE.ImageUtils.loadTexture('./assets/ghost.jpg');
case "breath_sound": return "assets/breathe.mp3"; break;
case "gong_sound": return "assets/gong.wav"; break;
case "slam_sound": return "assets/slam.mp3"; break;
}
}
else if(atmosphere == "happy" && sound == "happy") {
switch(item) {
case "font-family": return "happyFont"; break;
case "chest_items": return ["zoom_out", "jump_happy", "move_to_start", "rotate_maze", "increase_time", "decrease_time", "random_teleportation"]; break;
case "chest_probabilities": return [0.3, 0.14, 0.03, 0.13, 0.15, 0.15, 0.1]; break;
case "chest_texture": return THREE.ImageUtils.loadTexture('./assets/chest1.jpg'); break;
case "head_texture": return THREE.ImageUtils.loadTexture('./assets/hairHappy.jpg'); break;
case "player_texture": return THREE.ImageUtils.loadTexture('./assets/cloakHappy.png'); break;
case "ground_texture": return THREE.ImageUtils.loadTexture('./assets/ground1.jpg'); break;
case "wall_texture": return THREE.ImageUtils.loadTexture('./assets/flowerHedge.jpg'); break;
case "background_music": return "assets/payday.mp3"; break;
case "light_intensity": return 1; break;
case "enemy_texture": return THREE.ImageUtils.loadTexture('./assets/grandma.jpg');
case "death_sound": return "assets/jingle_fail.wav"; break;
case "end_sound": return "assets/shipsbell.wav"; break;
case "step_sound": return "assets/piano1.wav"; break;
case "breath_sound": return "assets/hey-sweetness-2.wav"; break;
case "gong_sound": return "assets/shipsbell.wav"; break;
case "slam_sound": return "assets/yawn.mp3"; break;
}
}
else if(atmosphere == "happy" && sound == "horror") {
switch(item) {
case "font-family": return "happyFont"; break;
case "chest_items": return ["zoom_out", "jump_happy", "move_to_start", "rotate_maze", "increase_time", "decrease_time", "random_teleportation"]; break;
case "chest_probabilities": return [0.3, 0.14, 0.03, 0.13, 0.15, 0.15, 0.1]; break; case "chest_texture": return THREE.ImageUtils.loadTexture('./assets/chest1.jpg'); break;
case "head_texture": return THREE.ImageUtils.loadTexture('./assets/hairHappy.jpg'); break;
case "player_texture": return THREE.ImageUtils.loadTexture('./assets/cloakHappy.png'); break;
case "ground_texture": return THREE.ImageUtils.loadTexture('./assets/ground1.jpg'); break;
case "wall_texture": return THREE.ImageUtils.loadTexture('./assets/flowerHedge.jpg'); break;
case "light_intensity": return 1; break;
case "enemy_texture": return THREE.ImageUtils.loadTexture('./assets/grandma.jpg');
case "background_music": return "assets/background.mp3"; break;
case "death_sound": return "assets/gong.wav"; break;
case "end_sound": return "assets/ghastlyboom.mp3"; break;
case "step_sound": return "assets/10-2 closeEnd.wav"; break;
case "breath_sound": return "assets/breathe.mp3"; break;
case "gong_sound": return "assets/gong.wav"; break;
case "slam_sound": return "assets/slam.mp3"; break;
}
}
else if(atmosphere == "horror" && sound == "happy") {
switch(item) {
case "font-family": return "scaryFont"; break;
case "chest_items": return ["zoom_out", "jump_scare", "move_to_start", "rotate_maze", "light_darker", "increase_time", "decrease_time", "random_teleportation"]; break;
case "chest_probabilities": return [0.3, 0.07, 0.03, 0.13, 0.07, 0.15, 0.15, 0.1]; break;
case "chest_texture": return THREE.ImageUtils.loadTexture('./assets/chest.jpg'); break;
case "head_texture": return THREE.ImageUtils.loadTexture('./assets/hair.jpg'); break;
case "player_texture": return THREE.ImageUtils.loadTexture('./assets/cloak.jpg'); break;
case "ground_texture": return THREE.ImageUtils.loadTexture('./assets/dark_ground2.jpg'); break;
case "wall_texture": return THREE.ImageUtils.loadTexture('./assets/hedge.jpg'); break;
case "background_music": return "assets/payday.mp3"; break;
case "death_sound": return "assets/jingle_fail.wav"; break;
case "end_sound": return "assets/shipsbell.wav"; break;
case "step_sound": return "assets/piano1.wav"; break;
case "light_intensity": return 0.5; break;
case "enemy_texture": return THREE.ImageUtils.loadTexture('./assets/ghost.jpg');
case "breath_sound": return "assets/hey-sweetness-2.wav"; break;
case "gong_sound": return "assets/shipsbell.wav"; break;
case "slam_sound": return "assets/yawn.mp3"; break;
}
}
}