Minispiel eingebaut, Minispiel Animationen und Sounds

This commit is contained in:
Hilmer, Carsten 2016-11-11 13:41:34 +01:00
parent 2d63ab9a2a
commit 3179418b74
55 changed files with 11546 additions and 6 deletions

View File

@ -289,6 +289,54 @@ to {background-position: -2000px 0;}
}
.teddy {
position: fixed;
top: 50%;
left: 50%;
width: 256px;
height: 256px;
margin-left: -128px;
margin-top: -128px;
overflow: hidden;
}
.teddybackground {
background: url('../img/Teddybear/Teddy_klein/Teddybackgound.png');
}
.teddyani1 {
width: 256px;
height: 1024px;
background: url('../img/Teddybear/Teddy_klein/Teddybear_ani1.png') left center;
-webkit-animation: teddyspriteani 1.4s steps(4) infinite;
}
.teddyani2 {
width: 256px;
height: 1024px;
background: url('../img/Teddybear/Teddy_klein/Teddybear_ani2.png') left center;
-webkit-animation: teddyspriteani 1.4s steps(4) infinite;
}
.teddyani3 {
width: 256px;
height: 1024px;
background: url('../img/Teddybear/Teddy_klein/Teddybear_ani3.png') left center;
-webkit-animation: teddyspriteani 1.4s steps(4) infinite;
}
.teddyani4 {
width: 256px;
height: 1024px;
background: url('../img/Teddybear/Teddy_klein/Teddybear_ani4.png') left center;
-webkit-animation: teddyspriteani 1.4s steps(4) infinite;
}
@-webkit-keyframes teddyspriteani {
100% { background-position: 0 -1024px; }
}
#background-wrap {
bottom: 0;
@ -350,7 +398,6 @@ to {background-position: -2000px 0;}
-moz-transform: scale(0.3);
transform: scale(0.3);
}
/*
.x3 {
-webkit-animation: animateCloud 30s linear infinite;
-moz-animation: animateCloud 30s linear infinite;
@ -361,6 +408,7 @@ to {background-position: -2000px 0;}
transform: scale(0.5);
}
/*
.x4 {
-webkit-animation: animateCloud 18s linear infinite;
-moz-animation: animateCloud 18s linear infinite;
@ -383,6 +431,15 @@ to {background-position: -2000px 0;}
*/
/* OBJECTS */
.ufo {
background: url('../img/ufo.png');
position: relative;
height: 64px;
position: relative;
width: 64px;
}
.cloud {
background: #fff;
background: -moz-linear-gradient(top, #fff 5%, #f1f1f1 100%);

1412
www/img/Teddybear/Teddy1.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

1424
www/img/Teddybear/Teddy2.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

1426
www/img/Teddybear/Teddy3.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

1425
www/img/Teddybear/Teddy4.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

1426
www/img/Teddybear/Teddy5.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

1426
www/img/Teddybear/Teddy6.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

1428
www/img/Teddybear/Teddy7.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

1428
www/img/Teddybear/Teddy8.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
www/img/ufo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -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();
}
}
});

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -30,6 +30,7 @@
<div class="cloud"></div>
</div>
</div>

View File

@ -36,5 +36,10 @@
<div class="mentorborderbravo" ng-show="showmentorbravo">
<div class="mentorbravo"></div>
</div>
<div class="teddy" ng-class="{'teddybackground': teddyback}" ng-show="showteddybear" ng-click="teddyaction()">
<div ng-class="{'teddyani1': teddyani1, 'teddyani2': teddyani2, 'teddyani3': teddyani3, 'teddyani4': teddyani4}"></div>
</div>
</ion-content>
</ion-view>