Mentor eingebaut, CSS-Queries eingebaut, Hilfe eingebaut, Midi Files
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// angular.module is a global place for creating, registering and retrieving Angular modules
|
||||
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
|
||||
// the 2nd parameter is an array of 'requires'
|
||||
angular.module('kinderspiel', ['ionic', 'ngCordova', 'ngDraggable', 'kinderspiel.controllers', 'kinderspiel.services'])
|
||||
angular.module('kinderspiel', ['ionic', 'ngCordova','ngAnimate', 'ngDraggable', 'kinderspiel.controllers', 'kinderspiel.services'])
|
||||
|
||||
.run(function($ionicPlatform) {
|
||||
$ionicPlatform.ready(function() {
|
||||
|
||||
@@ -2,8 +2,11 @@ angular.module('kinderspiel.controllers', [])
|
||||
|
||||
.controller('home', function($scope, $ionicPlatform, $cordovaMedia, $state ) {
|
||||
|
||||
$scope.showmentor=false;
|
||||
|
||||
$ionicPlatform.ready(function() {
|
||||
var media = new Media('/android_asset/www/sounds/hintergrundmusik1.mp3', fertig,null);
|
||||
var media = new Media('/android_asset/www/sounds/TORN.MID', fertig,null);
|
||||
//var media = new Media('/android_asset/www/sounds/hintergrundmusik1.mp3', fertig,null);
|
||||
var media1 = new Media('/android_asset/www/sounds/bravo.mp3', null,null);
|
||||
var mediastartespiel1 = new Media('/android_asset/www/sounds/spiel1.mp3', goto_spiel1,null);
|
||||
$scope.mymedia=media;
|
||||
@@ -11,7 +14,7 @@ $scope.mymedia1=media1;
|
||||
$scope.mediastartespiel1=mediastartespiel1;
|
||||
|
||||
$scope.mymedia.play();
|
||||
$scope.mymedia.setVolume('0.1');
|
||||
$scope.mymedia.setVolume('0.3');
|
||||
});
|
||||
|
||||
$scope.play = function(src) {
|
||||
@@ -26,28 +29,32 @@ $scope.mymedia.setVolume('0.1');
|
||||
|
||||
$scope.starte_spiel2 = function(){
|
||||
$scope.mymedia1.play();
|
||||
$scope.mymedia1.setVolume('0.6');
|
||||
$scope.mymedia1.setVolume('1.0');
|
||||
}
|
||||
|
||||
function fertig(){
|
||||
$scope.mymedia.play();
|
||||
$scope.mymedia.setVolume('0.1');
|
||||
$scope.mymedia.setVolume('0.3');
|
||||
}
|
||||
|
||||
|
||||
$scope.starte_spiel1 = function(){
|
||||
$scope.showmentor=true;
|
||||
$scope.mediastartespiel1.play();
|
||||
$scope.mediastartespiel1.setVolume('0.6');
|
||||
$scope.mediastartespiel1.setVolume('1.0');
|
||||
}
|
||||
|
||||
function goto_spiel1() {
|
||||
$scope.mediastartespiel1.release();
|
||||
$scope.showmentor=false;
|
||||
$state.go('spiel1');
|
||||
}
|
||||
|
||||
})
|
||||
.controller('Spiel1Ctrl', function($scope, $ionicPlatform, $cordovaMedia, $state, $timeout) {
|
||||
|
||||
$scope.showmentor=false;
|
||||
$scope.showmentorbravo=false;
|
||||
$scope.spiele=[];
|
||||
$scope.spieleview=[];
|
||||
$scope.tierfinden='';
|
||||
@@ -171,6 +178,13 @@ var tier7 = {
|
||||
$scope.spiele.push(tier7);
|
||||
|
||||
|
||||
$scope.hilfe = function() {
|
||||
$scope.showmentor=true;
|
||||
$timeout(function () {
|
||||
$scope.showmentor=false;
|
||||
}, 3500);
|
||||
$scope.sounds[$scope.randomid].play();
|
||||
}
|
||||
|
||||
$scope.answer = function(src) {
|
||||
|
||||
@@ -188,7 +202,11 @@ $scope.answer = function(src) {
|
||||
}, 500);
|
||||
}, 500);
|
||||
}, 500);
|
||||
|
||||
$scope.showmentorbravo=true;
|
||||
$timeout(function () {
|
||||
$scope.showmentorbravo=false;
|
||||
$timeout(function () {$scope.showmentor=true;}, 1200);
|
||||
}, 2400);
|
||||
$scope.bravosound.play();
|
||||
}
|
||||
else{
|
||||
@@ -222,8 +240,14 @@ var shuffleArray = function(array) {
|
||||
}
|
||||
|
||||
function goto_newspiel() {
|
||||
|
||||
$scope.showmentor=true;
|
||||
|
||||
$scope.randomid = getRandomInt(1, 8);
|
||||
//$scope.play('/android_asset/www/sounds/' + $scope.sounds[$scope.randomid]);
|
||||
$timeout(function () {
|
||||
$scope.showmentor=false;
|
||||
}, 3500);
|
||||
$scope.sounds[$scope.randomid].play();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user