Skip to content

Commit 4219617

Browse files
committed
version 0.9.1
1 parent cdd507c commit 4219617

File tree

10 files changed

+106
-36
lines changed

10 files changed

+106
-36
lines changed

audio/README.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ dragdrop.wav : http://soundbible.com/2044-Tick.html lizenziert unter Attributio
1313
error.wav : http://www.soundjay.com/button/sounds/button-10.mp3
1414
button-click.wav : http://soundbible.com/1280-Click-On.html lizenziert unter Attribution 3.0 (https://creativecommons.org/licenses/by/3.0/)
1515
splash.wav : http://soundbible.com/1097-Slime-Splash.html lizenziert unter Attribution 3.0 (https://creativecommons.org/licenses/by/3.0/)
16-
tada.wav : http://soundbible.com/1003-Ta-Da.html lizenziert unter Attribution 3.0 (https://creativecommons.org/licenses/by/3.0/)
16+
tada.wav : http://soundbible.com/1003-Ta-Da.html lizenziert unter Attribution 3.0 (https://creativecommons.org/licenses/by/3.0/)
17+
fail.wav : http://soundbible.com/1623-Dun-Dun-Dun.html lizenziert unter Attribution 3.0 (https://creativecommons.org/licenses/by/3.0/)
18+
remove_tile.wav : http://soundbible.com/2067-Blop.html lizenziert unter Attribution 3.0 (https://creativecommons.org/licenses/by/3.0/)
19+
combulix-in-out.wav : http://soundbible.com/2068-Woosh.html lizenziert unter Attribution 3.0 (https://creativecommons.org/licenses/by/3.0/)

audio/combulix-in-out.wav

97.8 KB
Binary file not shown.

audio/fail.wav

203 KB
Binary file not shown.

audio/remove_tile.wav

85.6 KB
Binary file not shown.

css/levelview.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@
279279
position: absolute;
280280
top: 0;
281281
left: 0;
282-
z-index: 100;
282+
z-index: 98;
283283
}
284284

285285
/* Buttons des Score-Screens */

html/splash.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<input type='submit' id='continue' class='active' value='weiter'>
3131
</form>
3232

33-
<div id='version'>v. 0.9.0</div>
33+
<div id='version'>v. 0.9.1</div>
3434

3535
</div>
3636

js/audio.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ var audio = {
1616
bubbleSound: new Audio("../audio/bubble.wav"),
1717
splashSound: new Audio("../audio/splash.wav"),
1818
tadaSound: new Audio("../audio/tada.wav"),
19+
failSound: new Audio("../audio/fail.wav"),
20+
removeSound: new Audio("../audio/dragdrop.wav"),
21+
combulixSound: new Audio("../audio/combulix-nav.wav"),
1922

2023
soundOnClick : function (selector) {
2124

@@ -33,12 +36,19 @@ var audio = {
3336
} else if ($(this).is(".menu-button, #continue, .close-button")) {
3437
audio.menuButtonSound.load();
3538
audio.menuButtonSound.play();
36-
} else if ($(this).is(".arrow")) {
37-
audio.combulixNav.load();
38-
audio.combulixNav.play();
3939
} else if ($(this).is("#startbutton")) {
4040
audio.bubbleSound.load();
4141
audio.bubbleSound.play();
42+
} else if ($(this).is(".event-blocker")) {
43+
audio.errorSound.volume = 0.15; //Der Ton ist initial sehr laut und wird nur mit extrem niedrigen %-Werten wirklich leiser.
44+
audio.errorSound.load();
45+
audio.errorSound.play();
46+
} else if ($(this).is(".to-level-selection-button")) {
47+
audio.menuButtonSound.load();
48+
audio.menuButtonSound.play();
49+
} else if ($(this).is(".continue-button")) {
50+
audio.menuButtonSound.load();
51+
audio.menuButtonSound.play();
4252
}
4353

4454
});

js/combulix.js

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,34 @@ var combulix = {
6969
next: function() {
7070
if (this.current + 1 < this.speeches.length) {
7171
this.set(this.current + 1);
72+
73+
//Spiele Sound
74+
if(getCurrentPlayerObject() !== null && getCurrentPlayerObject().playSound) {
75+
audio.combulixNav.load();
76+
audio.combulixNav.play();
77+
}
7278
} else {
7379
if (typeof this.speeches[this.current].audio !== 'undefined') this.speeches[this.current].audio.pause();
7480
if (typeof this.speeches[this.current].offCallback !== 'undefined') this.speeches[this.current].offCallback.call(this.speeches[this.current]);
7581
this.slideOut();
82+
83+
//Spiele Sound
84+
if(getCurrentPlayerObject() !== null && getCurrentPlayerObject().playSound) {
85+
audio.combulixSound.load();
86+
audio.combulixSound.play();
87+
}
7688
}
7789
},
7890

7991
previous: function() {
8092
if (this.current - 1 >= 0) {
8193
combulix.set(this.current - 1);
94+
95+
//Spiele Sound
96+
if(getCurrentPlayerObject() !== null && getCurrentPlayerObject().playSound) {
97+
audio.combulixNav.load();
98+
audio.combulixNav.play();
99+
}
82100
}
83101
},
84102

@@ -102,8 +120,16 @@ var combulix = {
102120

103121
if (!hasEventHandler("arrow left", "click"))
104122
$(".arrow.left").click(function(event) {
105-
if ($(".combulix").is(":hidden")) combulix.slideIn();
106-
else combulix.previous();
123+
if ($(".combulix").is(":hidden")) {
124+
combulix.slideIn();
125+
126+
//Spiele Sound
127+
if(getCurrentPlayerObject() !== null && getCurrentPlayerObject().playSound) {
128+
audio.combulixSound.load();
129+
audio.combulixSound.play();
130+
}
131+
132+
} else combulix.previous();
107133
});
108134

109135
/*

js/levelview.js

Lines changed: 49 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,10 @@ $(function() {
418418
* Spielt den Sound ab, welcher das Platzieren eines Tiles repräsentiert.
419419
*/
420420
function playDragdropSound() {
421-
audio.dragdropSound.load();
422-
audio.dragdropSound.play();
421+
if(getCurrentPlayerObject() !== null && getCurrentPlayerObject().playSound) {
422+
audio.dragdropSound.load();
423+
audio.dragdropSound.play();
424+
}
423425
}
424426

425427
//Eventhandler initialisieren
@@ -465,7 +467,10 @@ $(function() {
465467
updateLevelPointValueDisplay();
466468

467469
//Abspielen des Sounds
468-
playDragdropSound();
470+
if(getCurrentPlayerObject() !== null && getCurrentPlayerObject().playSound) {
471+
audio.removeSound.load();
472+
audio.removeSound.play();
473+
}
469474

470475
} else if (event.type === EVENT_TYPE['swapped']) { //Zwei Tiles wurden vertauscht
471476

@@ -481,8 +486,10 @@ $(function() {
481486
level.endRun();
482487

483488
//Sound abspielen
484-
audio.tadaSound.load();
485-
audio.tadaSound.play();
489+
if(getCurrentPlayerObject() !== null && getCurrentPlayerObject().playSound) {
490+
audio.tadaSound.load();
491+
audio.tadaSound.play();
492+
}
486493

487494
//Die Punkte berechnen
488495
var scoreObject = getScoreObject();
@@ -630,6 +637,11 @@ $(function() {
630637
})
631638
.appendTo("#score-display-content");
632639

640+
if(getCurrentPlayerObject() !== null && getCurrentPlayerObject().playSound) {
641+
audio.soundOnClick(".to-level-selection-button");
642+
audio.soundOnClick(".continue-button");
643+
}
644+
633645
$("#score-display").hide().fadeIn(800);
634646

635647
});
@@ -640,8 +652,10 @@ $(function() {
640652
level.endRun();
641653

642654
// Sound abspielen
643-
audio.errorSound.load();
644-
audio.errorSound.play();
655+
if(getCurrentPlayerObject() !== null && getCurrentPlayerObject().playSound) {
656+
audio.failSound.load();
657+
audio.failSound.play();
658+
}
645659

646660
//Fail-Feedback
647661
$(".game").animate({
@@ -1053,9 +1067,23 @@ $(function() {
10531067

10541068
),
10551069

1056-
new Speech("Das wars für den Anfang. Du solltest jetzt alleine klarkommen.<br><br> Wenn du glaubst, du hast eine gute Lösung gebaut, und möchtest sie ausprobieren, klicke auf den \"Testen\" Button.", undefined,
1070+
new Speech("Das wars für den Anfang. Du solltest jetzt alleine klarkommen.<br><br> Wenn du glaubst, eine gute Lösung gebaut zu haben und möchtest sie ausprobieren, klicke auf den \"Testen\"-Button.", undefined,
10571071

10581072
function () {
1073+
if (!tutorialFlags.added) {
1074+
tutorialFlags.added = true;
1075+
1076+
level.tools = {
1077+
corner: 2,
1078+
straight: 2
1079+
}
1080+
1081+
maxPointValue = level.getMaxPointValue(); //Muss beim manuellen Setzen der Tools nach Initialisierung
1082+
updateLevelPointValueDisplay();
1083+
1084+
updateToolBox();
1085+
}
1086+
10591087
$("#startbutton").fadeIn().addClass("highlighted");
10601088
combulix.disablePrevious();
10611089
}, //on
@@ -1066,24 +1094,9 @@ $(function() {
10661094

10671095
),
10681096

1069-
new Speech("Wenn der Test vollständig durchgelaufen ist, fehlerfrei oder nicht, wird unten der \"Weiterbasteln\"-Button aktiv.<br>Mit ihm entfernst du die Flüssigkeit aus dem System, so dass du weiterarbeiten kannst.", undefined,
1097+
new Speech("Wenn der Test vollständig durchgelaufen ist, fehlerfrei oder nicht, wird unten der \"Weiterbasteln\"-Button aktiv.<br><br>Mit ihm entfernst du die Flüssigkeit aus dem System, so dass du weiterarbeiten kannst.<br><br>Viel Spaß!", undefined,
10701098

1071-
function () { //on
1072-
if (!tutorialFlags.added) {
1073-
tutorialFlags.added = true;
1074-
1075-
level.tools = {
1076-
corner: 2,
1077-
straight: 2
1078-
}
1079-
1080-
maxPointValue = level.getMaxPointValue(); //Muss beim manuellen Setzen der Tools nach Initialisierung
1081-
updateLevelPointValueDisplay();
1082-
1083-
updateToolBox();
1084-
}
1085-
1086-
},
1099+
function () {}, //on
10871100

10881101
function () { //off
10891102
$("#startbutton").removeClass("highlighted");
@@ -1116,7 +1129,7 @@ $(function() {
11161129

11171130
$('#startbutton').click(function() {
11181131

1119-
if (playerObject.showGameTutorial) $("#startbutton").removeClass("highlighted"); //Falls das Tutorial diesen gehighlighted hat!
1132+
$("#startbutton").removeClass("highlighted"); //z.b. Falls das Tutorial diesen gehighlighted hat!
11201133
if ($(this).text() === 'Testen') {
11211134

11221135
//Starte den Test
@@ -1129,8 +1142,10 @@ $(function() {
11291142
$(".event-blocker").show();
11301143

11311144
//Sound abspielen
1132-
audio.bubbleSound.load();
1133-
audio.bubbleSound.play();
1145+
if(getCurrentPlayerObject() !== null && getCurrentPlayerObject().playSound) {
1146+
audio.bubbleSound.load();
1147+
audio.bubbleSound.play();
1148+
}
11341149

11351150
} else if ($(this).text() === 'Weiterbasteln') {
11361151

@@ -1146,6 +1161,12 @@ $(function() {
11461161

11471162
});
11481163

1164+
$(".event-blocker").click(function () {
1165+
if ($("#startbutton").text() === 'Weiterbasteln') $("#startbutton").addClass("highlighted");
1166+
});
1167+
1168+
audio.soundOnClick(".event-blocker");
1169+
11491170
//Aktiviere Start Button
11501171

11511172
setStartButtonEnabled(true);

spielstart.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
position: absolute;
1717
top: 0;
1818
left: 0;
19+
text-decoration: none;
20+
border: solid 2px black;
21+
margin: 10px;
22+
background-color: black;
23+
border-radius: 5px;
24+
}
25+
26+
a:hover {
27+
background-color: white;
28+
color: black;
1929
}
2030

2131
iframe {

0 commit comments

Comments
 (0)