diff --git a/README.md b/README.md index 86aedea..94039fe 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Plugins ionic plugin add cordova-plugin-screen-orientation cordova plugin add cordova-plugin-media cordova plugin add https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin.git +cordova plugin add cordova-plugin-crosswalk-webview diff --git a/www/css/htc.css b/_RemoveForDeployment_/css/htc.css similarity index 100% rename from www/css/htc.css rename to _RemoveForDeployment_/css/htc.css diff --git a/www/css/ipads.css b/_RemoveForDeployment_/css/ipads.css similarity index 100% rename from www/css/ipads.css rename to _RemoveForDeployment_/css/ipads.css diff --git a/www/css/iphones.css b/_RemoveForDeployment_/css/iphones.css similarity index 100% rename from www/css/iphones.css rename to _RemoveForDeployment_/css/iphones.css diff --git a/www/css/kindle_tablet.css b/_RemoveForDeployment_/css/kindle_tablet.css similarity index 100% rename from www/css/kindle_tablet.css rename to _RemoveForDeployment_/css/kindle_tablet.css diff --git a/www/css/nexus_tablet.css b/_RemoveForDeployment_/css/nexus_tablet.css similarity index 100% rename from www/css/nexus_tablet.css rename to _RemoveForDeployment_/css/nexus_tablet.css diff --git a/www/css/samsung.css b/_RemoveForDeployment_/css/samsung.css similarity index 100% rename from www/css/samsung.css rename to _RemoveForDeployment_/css/samsung.css diff --git a/www/css/samsung_tablet.css b/_RemoveForDeployment_/css/samsung_tablet.css similarity index 100% rename from www/css/samsung_tablet.css rename to _RemoveForDeployment_/css/samsung_tablet.css diff --git a/www/css/style.css b/www/css/style.css index c67f1d6..272160d 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -3,23 +3,12 @@ background-size: cover; color: #333; font: 100% Arial, Sans Serif; - height: 100vh; + height: 100%; margin: 0; padding: 0; overflow-x: hidden; } -.baumhaus { - background: url("../img/Background/treehouse.svg"); - background-size: cover; - position:fixed; - bottom:0; - left:-25px; - width: 256px; - height: 256px; - overflow: hidden; -} - .farmhaus { background: url("../img/Background/Farmhaus.svg"); background-size: cover; @@ -36,7 +25,7 @@ background-size: cover; position:fixed; bottom:65px; - Right:60px; + Right:50px; width: 60px; height: 80px; overflow: hidden; @@ -45,11 +34,12 @@ .kornspeicher { background: url("../img/Background/Kornspeicher.svg"); background-size: cover; + background-position:bottom; position:fixed; bottom:40px; Left:275px; width: 60px; - height: 80px; + height: 90px; overflow: hidden; } @@ -62,6 +52,19 @@ overflow: hidden; } +.baumhaus { + background: url("../img/Background/treehouse.svg"); + background-size: cover; + position:fixed; + bottom:0; + left:-25px; + width: 256px; + height: 256px; + overflow: hidden; +} + + + /* Bild groessen */ .suchspielbuttonsizebig{ width:128px; @@ -167,22 +170,23 @@ -moz-transform: scale(0.3); transform: scale(0.3); } -.x3 { - -webkit-animation: animateCloud 30s linear infinite; - -moz-animation: animateCloud 30s linear infinite; - animation: animateCloud 30s linear infinite; + +.ufox { + -webkit-animation: animateCloud 8s linear infinite; + -moz-animation: animateCloud 8s linear infinite; + animation: animateCloud 8s linear infinite; - -webkit-transform: scale(0.5); - -moz-transform: scale(0.5); - transform: scale(0.5); + -webkit-transform: scale(0.3); + -moz-transform: scale(0.3); + transform: scale(0.3); } .ufo { background: url('../img/ufo.png'); + background-size: cover; + height: 128px; + width: 128px; position: relative; - height: 64px; - position: relative; - width: 64px; } @@ -236,4 +240,114 @@ height: 180px; right: 50px; top: -90px; +} + + + +/* ----------- Kindle Fire HD 7" ----------- */ +/* Landscape */ +@media only screen + and (min-device-width: 800px) + and (max-device-width: 1280px) + and (-webkit-min-device-pixel-ratio: 1.5) + and (orientation: landscape) { + + .farmhaus { + background: url("../img/Background/Farmhaus.svg"); + background-size: cover; + position:fixed; + bottom:130px; + right:20px; + width: 60px; + height: 80px; + overflow: hidden; + } + + .windrad { + background: url("../img/Background/Windrad.svg"); + background-size: cover; + position:fixed; + bottom:130px; + right:130px; + width: 120px; + height: 160px; + overflow: hidden; + } + + .kornspeicher { + background: url("../img/Background/Kornspeicher.svg"); + background-size: cover; + background-position:bottom; + position:fixed; + bottom:80px; + left:330px; + width: 120px; + height: 180px; + overflow: hidden; + } + + .suchspielbutton { + position: absolute; + bottom:15px; + left:485px; + width: 128px; + height: 128px; + overflow: hidden; + } + +} + + + +/* ----------- Galaxy S5 Mini----------- */ +/* Landscape */ +@media screen + and (device-width: 640px) + and (device-height: 360px) + and (-webkit-device-pixel-ratio: 2) + and (orientation: landscape) { + +.farmhaus { + background: url("../img/Background/Farmhaus.svg"); + background-size: cover; + position:fixed; + bottom:40px; + right:10px; + width: 30px; + height: 40px; + overflow: hidden; +} + +.windrad { + background: url("../img/Background/Windrad.svg"); + background-size: cover; + position:fixed; + bottom:45px; + right:50px; + width: 60px; + height: 80px; + overflow: hidden; +} + +.kornspeicher { + background: url("../img/Background/Kornspeicher.svg"); + background-size: cover; + background-position:bottom; + position:fixed; + bottom:20px; + left:275px; + width: 60px; + height: 90px; + overflow: hidden; +} + +.suchspielbutton { + position: absolute; + bottom:5px; + left:370px; + width: 128px; + height: 128px; + overflow: hidden; +} + } \ No newline at end of file diff --git a/www/img/Katzelupe.psd b/www/img/Katzelupe.psd new file mode 100644 index 0000000..297fffb Binary files /dev/null and b/www/img/Katzelupe.psd differ diff --git a/www/js/home_controller.js b/www/js/home_controller.js index 7e7d1a2..23ac626 100644 --- a/www/js/home_controller.js +++ b/www/js/home_controller.js @@ -8,6 +8,7 @@ appControllers.controller('home', function($scope, $rootScope, $ionicPlatform, $ $scope.CSSFarmhaus=false; $scope.CSSWindrad=false; $scope.CSSKornspeicher=false; + $scope.CSSufo=false; $scope.baumhauszufallaction=99; @@ -16,11 +17,13 @@ appControllers.controller('home', function($scope, $rootScope, $ionicPlatform, $ var farmhaussound=''; var windradsound=''; var kornspeichersound=''; + var ufosound=''; var mentor_is_speakting=false; var farmhaus_is_sounding=false; var windrad_is_sounding=false; var kornspeicher_is_sounding=false; + var ufo_is_sounding=false; $scope.$on("$ionicView.beforeEnter", function(event, data){ /* @@ -91,6 +94,14 @@ appControllers.controller('home', function($scope, $rootScope, $ionicPlatform, $ //$state.go('minispiel2'); } + /* + * DEVELOPMENT TEST + */ + $scope.devtest = function(){ + $state.go('minispiel2'); + } + + $scope.animate_farmhaus=function(){ $scope.CSSFarmhaus=true; playsound('farmhaussound', $scope.boingsound_action[getRandomInt(0, $scope.boingsound_action.length - 1)], farmhaussound_stop,'1.0'); @@ -108,6 +119,12 @@ appControllers.controller('home', function($scope, $rootScope, $ionicPlatform, $ playsound('kornspeichersound', $scope.boingsound_action[getRandomInt(0, $scope.boingsound_action.length - 1)], kornspeichersound_stop,'1.0'); } + + $scope.animate_ufo=function(){ + $scope.CSSufo=true; + playsound('ufosound', $scope.boingsound_action[getRandomInt(0, $scope.boingsound_action.length - 1)], ufosound_stop,'1.0'); + } + $scope.baumhaus_actiondo=function(){ $scope.baumhauszufallaction=getRandomInt(1,2); @@ -191,6 +208,28 @@ appControllers.controller('home', function($scope, $rootScope, $ionicPlatform, $ kornspeicher_is_sounding=true; } } + else if (playtype=='ufosound'){ + + + if (ufo_is_sounding==false){ + + try{ + + //versuchen Soundfile freizugeben + ufosound.release(); + } + catch(e){ + + //Soundfile Objekt gabs nicht oder Freigabefehler + console.log("Sounddatei nicht da"); + } + + ufosound = new Media(soundfile, callbackfunction ,null); + ufosound.play(); + ufosound.setVolume(volume); + ufo_is_sounding=true; + } + } else if (playtype=='mentorsound'){ if (mentor_is_speakting==false){ @@ -234,6 +273,14 @@ appControllers.controller('home', function($scope, $rootScope, $ionicPlatform, $ } + function ufosound_stop(){ + + $timeout(function () { $scope.CSSufo=false; }, 0); + ufosound.release(); + ufo_is_sounding=false; + + } + function farmhaussound_stop(){ $timeout(function () { $scope.CSSFarmhaus=false; }, 0); diff --git a/www/spielsets/minispielset2/css/minispiel.css b/www/spielsets/minispielset2/css/minispiel.css index 3ae2d1c..63b2a1c 100644 --- a/www/spielsets/minispielset2/css/minispiel.css +++ b/www/spielsets/minispielset2/css/minispiel.css @@ -18,4 +18,35 @@ .dropzone{ height:96px; width: 128px; +} + + +.rotate { + -webkit-animation:spin 4s linear; + -moz-animation:spin 4s linear; + animation:spin 4s linear; +} +@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } } +@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } } +@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } } + + +/* ----------- Kindle Fire HD 7" ----------- */ +/* Landscape */ +@media only screen + and (min-device-width: 800px) + and (max-device-width: 1280px) + and (-webkit-min-device-pixel-ratio: 1.5) + and (orientation: landscape) { + + .dragzone{ + height:100px; + width: 128px; + } + + .dropzone{ + height:200px; + width: 256px; + } + } \ No newline at end of file diff --git a/www/spielsets/minispielset2/js/minispiel_controller.js b/www/spielsets/minispielset2/js/minispiel_controller.js index 619801a..0098d99 100644 --- a/www/spielsets/minispielset2/js/minispiel_controller.js +++ b/www/spielsets/minispielset2/js/minispiel_controller.js @@ -10,6 +10,8 @@ $scope.chunkedDataBilderMask = []; $scope.spielendecounter=4; +$scope.complete=false; + /* * Spielset laden @@ -32,8 +34,11 @@ $ionicPlatform.ready(function() { * Sounds definieren */ - $scope.lachensounds=[]; - $scope.gamesounds=[]; + var completesound=''; + var failsound=''; + var setsound=''; + var rotatesound=''; + /* @@ -45,19 +50,21 @@ $ionicPlatform.ready(function() { * Typen: gameoversound -> Spielzu ende Zeit für minispiel etc. * Typen: backgroundmusic -> Hintergrundmusik */ - $http.get('spielsets/minispielset1/systemsounds.json').success(function(data) { + $http.get('spielsets/minispielset2/systemsounds.json').success(function(data) { for(var i = 0; i < data.length; i++) { - if (data[i].type=='lachensound'){ - $scope.lachensounds.push(data[i].sound); + if (data[i].type=='setsound'){ + $scope.setsound=data[i].sound; } - else if (data[i].type=='gamesound'){ - $scope.gamesounds.push(data[i].sound); - - $timeout(function () { - //playsound('gamesound', $scope.gamesounds[0], minispielstart,'1.0'); - }, 1000); + else if (data[i].type=='failsound'){ + $scope.failsound=data[i].sound; + } + else if (data[i].type=='completesound'){ + $scope.completesound=data[i].sound; + } + else if (data[i].type=='rotatesound'){ + $scope.rotatesound=data[i].sound; } else if (data[i].type=='backgroundmusic'){ //backgroundsounds_mediahandler.setbackgroundsoundfile(data[i].sound); @@ -106,16 +113,11 @@ function playsound(playtype, soundfile, callbackfunction, volume){ $ionicPlatform.ready(function() { - if (playtype=='lachensound'){ - - /* - * Nur durchführen wenn Bär nicht lacht - */ - if ($scope.bin_am_lachen==false){ + if (playtype=='setsound'){ try{ - lachensound.release(); + setsound.release(); } catch(e){ @@ -124,19 +126,17 @@ function playsound(playtype, soundfile, callbackfunction, volume){ console.log("Sounddatei nicht da"); } - lachensound = new Media(soundfile, callbackfunction ,null); - $scope.bin_am_lachen=true; - lachensound.play(); + setsound = new Media(soundfile, callbackfunction ,null); + setsound.play(); - } } - else if (playtype=='gamesound'){ + else if (playtype=='failsound'){ try{ //versuchen Soundfile freizugeben - gamesound.release(); + failsound.release(); } catch(e){ @@ -145,15 +145,81 @@ function playsound(playtype, soundfile, callbackfunction, volume){ console.log("Sounddatei nicht da"); } - gamesound = new Media(soundfile, callbackfunction ,null); - gamesound.play(); + failsound = new Media(soundfile, callbackfunction ,null); + failsound.play(); } + else if (playtype=='rotatesound'){ + + try{ + //versuchen Soundfile freizugeben + rotatesound.release(); + + } + catch(e){ + + //Soundfile Objekt gabs nicht oder Freigabefehler + console.log("Sounddatei nicht da"); + } + + rotatesound = new Media(soundfile, callbackfunction ,null); + rotatesound.play(); + + } + else if (playtype=='completesound'){ + + try{ + + //versuchen Soundfile freizugeben + completesound.release(); + + } + catch(e){ + + //Soundfile Objekt gabs nicht oder Freigabefehler + console.log("Sounddatei nicht da"); + } + + completesound = new Media(soundfile, callbackfunction ,null); + completesound.play(); + + } }); } +$scope.rotateitem=function(id){ + + if($scope.complete==true){ + + for(var i = 0; i < $scope.spiele.length; i++) { + + if (id==$scope.spiele[i].id){ + $scope.spiele[i].rotate=true; + playsound('rotatesound', $scope.rotatesound, null, '1.0'); + $timeout(function () { resetrotate(id); }, 4100); + } + + } + + } + +} + + +function resetrotate(id){ + + for(var i = 0; i < $scope.spiele.length; i++) { + + if (id==$scope.spiele[i].id){ + $scope.spiele[i].rotate=false; + } + + } + +} + $scope.onDragComplete=function(data,evt){ for(var i = 0; i < $scope.spiele.length; i++) { @@ -177,7 +243,7 @@ $scope.onDragStart=function(data,evt){ } $scope.onDragStop=function(data,evt){ - + playsound('failsound', $scope.failsound, null, '1.0'); for(var i = 0; i < $scope.spiele.length; i++) { if (data.id==$scope.spiele[i].id){ @@ -193,6 +259,7 @@ $scope.onDropComplete=function(data,evt,dropid){ //richtige form erwischt if (data.id==dropid){ + playsound('setsound', $scope.setsound, null, '1.0'); for(var i = 0; i < $scope.spiele.length; i++) { if (data.id==$scope.spiele[i].id){ @@ -207,8 +274,9 @@ $scope.onDropComplete=function(data,evt,dropid){ console.log("dropid: " + dropid + " drop success, data:", data); if ($scope.spielendecounter==0){ - - $timeout(function () { $state.go('home'); }, 5000); + $scope.complete=true; + playsound('completesound', $scope.completesound, null, '1.0'); + $timeout(function () { $state.go('home'); }, 15000); } } diff --git a/www/spielsets/minispielset2/sound/applaus.mp3 b/www/spielsets/minispielset2/sound/applaus.mp3 new file mode 100644 index 0000000..37fd068 Binary files /dev/null and b/www/spielsets/minispielset2/sound/applaus.mp3 differ diff --git a/www/spielsets/minispielset2/sound/fail.mp3 b/www/spielsets/minispielset2/sound/fail.mp3 new file mode 100644 index 0000000..6ec38b3 Binary files /dev/null and b/www/spielsets/minispielset2/sound/fail.mp3 differ diff --git a/www/spielsets/minispielset2/sound/glocke.mp3 b/www/spielsets/minispielset2/sound/glocke.mp3 new file mode 100644 index 0000000..81f26b6 Binary files /dev/null and b/www/spielsets/minispielset2/sound/glocke.mp3 differ diff --git a/www/spielsets/minispielset2/sound/kitzeldenbaeren.mp3 b/www/spielsets/minispielset2/sound/kitzeldenbaeren.mp3 deleted file mode 100644 index 67e7b4f..0000000 Binary files a/www/spielsets/minispielset2/sound/kitzeldenbaeren.mp3 and /dev/null differ diff --git a/www/spielsets/minispielset2/sound/lachen1.mp3 b/www/spielsets/minispielset2/sound/lachen1.mp3 deleted file mode 100644 index c53b53b..0000000 Binary files a/www/spielsets/minispielset2/sound/lachen1.mp3 and /dev/null differ diff --git a/www/spielsets/minispielset2/sound/lachen2.mp3 b/www/spielsets/minispielset2/sound/lachen2.mp3 deleted file mode 100644 index b970701..0000000 Binary files a/www/spielsets/minispielset2/sound/lachen2.mp3 and /dev/null differ diff --git a/www/spielsets/minispielset2/sound/rotate.mp3 b/www/spielsets/minispielset2/sound/rotate.mp3 new file mode 100644 index 0000000..b6ebf68 Binary files /dev/null and b/www/spielsets/minispielset2/sound/rotate.mp3 differ diff --git a/www/spielsets/minispielset2/sound/setzen.mp3 b/www/spielsets/minispielset2/sound/setzen.mp3 new file mode 100644 index 0000000..f63bca8 Binary files /dev/null and b/www/spielsets/minispielset2/sound/setzen.mp3 differ diff --git a/www/spielsets/minispielset2/spielset.json b/www/spielsets/minispielset2/spielset.json index d53f445..25e5915 100644 --- a/www/spielsets/minispielset2/spielset.json +++ b/www/spielsets/minispielset2/spielset.json @@ -1,6 +1,6 @@ [ - {"id": 0, "bild": "spielsets/minispielset2/images/blaues_auto.png", "bildmaske": "spielsets/minispielset2/images/blaues_auto_maske.png", "sound": "/android_asset/www/spielsets/spielset1/sounds/finde_affe.mp3", "display": 1, "dragged":0 }, - {"id": 1, "bild": "spielsets/minispielset2/images/rotes_auto.png", "bildmaske": "spielsets/minispielset2/images/rotes_auto_maske.png", "sound": "/android_asset/www/spielsets/spielset1/sounds/finde_esel.mp3", "display": 1, "dragged":0 }, - {"id": 2, "bild": "spielsets/minispielset2/images/schneemann.png", "bildmaske": "spielsets/minispielset2/images/schneemann_maske.png", "sound": "/android_asset/www/spielsets/spielset1/sounds/finde_hase.mp3", "display": 1, "dragged":0 }, - {"id": 3, "bild": "spielsets/minispielset2/images/teddy.png", "bildmaske": "spielsets/minispielset2/images/teddy_maske.png", "sound": "/android_asset/www/spielsets/spielset1/sounds/finde_hund.mp3", "display": 1, "dragged":0 } + {"id": 0, "bild": "spielsets/minispielset2/images/blaues_auto.png", "bildmaske": "spielsets/minispielset2/images/blaues_auto_maske.png", "sound": "/android_asset/www/spielsets/spielset1/sounds/finde_affe.mp3", "rotate":0, "display": 1, "dragged":0 }, + {"id": 1, "bild": "spielsets/minispielset2/images/rotes_auto.png", "bildmaske": "spielsets/minispielset2/images/rotes_auto_maske.png", "sound": "/android_asset/www/spielsets/spielset1/sounds/finde_esel.mp3", "rotate":0, "display": 1, "dragged":0 }, + {"id": 2, "bild": "spielsets/minispielset2/images/schneemann.png", "bildmaske": "spielsets/minispielset2/images/schneemann_maske.png", "sound": "/android_asset/www/spielsets/spielset1/sounds/finde_hase.mp3", "rotate":0, "display": 1, "dragged":0 }, + {"id": 3, "bild": "spielsets/minispielset2/images/teddy.png", "bildmaske": "spielsets/minispielset2/images/teddy_maske.png", "sound": "/android_asset/www/spielsets/spielset1/sounds/finde_hund.mp3", "rotate":0, "display": 1, "dragged":0 } ] \ No newline at end of file diff --git a/www/spielsets/minispielset2/systemsounds.json b/www/spielsets/minispielset2/systemsounds.json index 44e47af..467c93d 100644 --- a/www/spielsets/minispielset2/systemsounds.json +++ b/www/spielsets/minispielset2/systemsounds.json @@ -1,5 +1,7 @@ [ - {"id": 0, "type": "gamesound", "sound": "/android_asset/www/spielsets/minispielset1/sound/kitzeldenbaeren.mp3"}, - {"id": 1, "type": "lachensound", "sound": "/android_asset/www/spielsets/minispielset1/sound/lachen1.mp3"}, - {"id": 2, "type": "lachensound", "sound": "/android_asset/www/spielsets/minispielset1/sound/lachen2.mp3"} + {"id": 0, "type": "gamesound", "sound": "/android_asset/www/spielsets/minispielset2/sound/kitzeldenbaeren.mp3"}, + {"id": 1, "type": "setsound", "sound": "/android_asset/www/spielsets/minispielset2/sound/setzen.mp3"}, + {"id": 2, "type": "failsound", "sound": "/android_asset/www/spielsets/minispielset2/sound/fail.mp3"}, + {"id": 3, "type": "completesound", "sound": "/android_asset/www/spielsets/minispielset2/sound/applaus.mp3"}, + {"id": 4, "type": "rotatesound", "sound": "/android_asset/www/spielsets/minispielset2/sound/rotate.mp3"} ] \ No newline at end of file diff --git a/www/spielsets/minispielset2/templates/minispiel.html b/www/spielsets/minispielset2/templates/minispiel.html index 3daebb5..d307f11 100644 --- a/www/spielsets/minispielset2/templates/minispiel.html +++ b/www/spielsets/minispielset2/templates/minispiel.html @@ -12,7 +12,7 @@
-
+

diff --git a/www/templates/home.html b/www/templates/home.html index ce843af..6afe8f3 100644 --- a/www/templates/home.html +++ b/www/templates/home.html @@ -6,7 +6,7 @@
-
+
@@ -21,18 +21,21 @@ -
-
-
+ +
+
+
-
-
+
+
+
+ +
+
+
-
- -