Minispiel eingebaut, Minispiel Animationen und Sounds
This commit is contained in:
@@ -30,7 +30,7 @@ $scope.CSSFalscheAntwort = false;
|
||||
$scope.CCSInittimer = false;
|
||||
|
||||
//SpieleTimer
|
||||
$scope.Spielzeit = 180;
|
||||
$scope.Spielzeit = 90;
|
||||
$scope.showgametimer = false;
|
||||
|
||||
//Spielzeit vorbei
|
||||
@@ -48,6 +48,10 @@ $scope.punktebonus=0;
|
||||
$scope.rundenstart = '';
|
||||
$scope.rundenende = '';
|
||||
|
||||
//Minispiel
|
||||
$scope.showteddybear=false;
|
||||
$scope.teddyback=false;
|
||||
|
||||
|
||||
$ionicPlatform.ready(function() {
|
||||
|
||||
@@ -94,6 +98,14 @@ $ionicPlatform.ready(function() {
|
||||
var kartegebensound = new Media('/android_asset/www/sounds/karte.mp3', kartegeben,null);
|
||||
var aufloesungsound = new Media('/android_asset/www/sounds/soundsneu/aufloesung.mp3', aufloesung,null);
|
||||
|
||||
/*
|
||||
* Spielende - Minispiel
|
||||
*/
|
||||
var spielendesound = new Media('/android_asset/www/sounds/minispiel/geschafft.mp3', minispielintro,null);
|
||||
var minispielsound = new Media('/android_asset/www/sounds/minispiel/kitzeldenbaeren.mp3', minispielstart,null);
|
||||
var minispielsound1 = new Media('/android_asset/www/sounds/minispiel/lachen1.mp3', null,null);
|
||||
var minispielsound2 = new Media('/android_asset/www/sounds/minispiel/lachen2.mp3', null,null);
|
||||
|
||||
|
||||
/*
|
||||
* Sounds in $Scope referenzieren
|
||||
@@ -101,6 +113,11 @@ $ionicPlatform.ready(function() {
|
||||
$scope.kartegebensound=kartegebensound;
|
||||
$scope.aufloesung=aufloesungsound;
|
||||
|
||||
$scope.spielendesound=spielendesound;
|
||||
$scope.minispielsound=minispielsound;
|
||||
$scope.minispielsound1=minispielsound1;
|
||||
$scope.minispielsound2=minispielsound2;
|
||||
|
||||
$scope.bravosounds.push(bravosound1);
|
||||
$scope.bravosounds.push(bravosound2);
|
||||
$scope.bravosounds.push(bravosound3);
|
||||
@@ -502,13 +519,48 @@ function karteausblenden(){
|
||||
|
||||
}
|
||||
else{
|
||||
//Belohnung hier rein
|
||||
$state.go('home');
|
||||
spielende();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Spielende
|
||||
*/
|
||||
function spielende(){
|
||||
|
||||
//Belohnung hier rein
|
||||
//$state.go('home');
|
||||
|
||||
$timeout(function () {
|
||||
$scope.showmentorbravo=true;
|
||||
$scope.spielendesound.play();
|
||||
}, 10);
|
||||
|
||||
//$scope.showteddybear=true
|
||||
|
||||
}
|
||||
|
||||
function minispielintro(){
|
||||
$scope.minispielsound.play();
|
||||
}
|
||||
|
||||
|
||||
function minispielstart(){
|
||||
$timeout(function () {
|
||||
$scope.showmentorbravo=false;
|
||||
$scope.showteddybear=true;
|
||||
$scope.teddyback=true;
|
||||
}, 10);
|
||||
$timeout(function () {
|
||||
$scope.showteddybear=false;
|
||||
$state.go('home');
|
||||
}, 30000);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* SpieleTimer Funktion
|
||||
*/
|
||||
@@ -524,8 +576,6 @@ function SpieleTimer(){
|
||||
else{
|
||||
$scope.spielvorbei=true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function aufloesung(){
|
||||
@@ -653,4 +703,36 @@ function inittimer(){
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* MiniSpiel kitzel den Teddy
|
||||
*/
|
||||
$scope.teddyaction = function() {
|
||||
$scope.teddyanimation=getRandomInt(1,4);
|
||||
$scope.teddyback=false;
|
||||
$scope.teddyani1=false;
|
||||
$scope.teddyani2=false;
|
||||
$scope.teddyani3=false;
|
||||
$scope.teddyani4=false;
|
||||
|
||||
if ($scope.teddyanimation==1){
|
||||
$scope.teddyani1=true;
|
||||
$scope.minispielsound1.play();
|
||||
}
|
||||
if ($scope.teddyanimation==2){
|
||||
$scope.teddyani2=true;
|
||||
$scope.minispielsound2.play();
|
||||
}
|
||||
if ($scope.teddyanimation==3){
|
||||
$scope.teddyani3=true;
|
||||
$scope.minispielsound1.play();
|
||||
}
|
||||
if ($scope.teddyanimation==4){
|
||||
$scope.teddyani4=true;
|
||||
$scope.minispielsound2.play();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user