Refactoring

This commit is contained in:
Hilmer, Carsten
2016-11-09 16:23:52 +01:00
parent ebe07280d5
commit 685c34cff8
27 changed files with 2332 additions and 15 deletions

View File

@@ -87,9 +87,9 @@ angular.module('kinderspiel', ['ionic', 'ngCordova','ngAnimate', 'ngDraggable',
templateUrl: 'templates/home.html',
controller: 'home'
})
.state('spiel1', {
url: '/spiel1',
templateUrl: 'templates/spiel1.html',
.state('suchspiel', {
url: '/suchspiel',
templateUrl: 'templates/suchspiel.html',
controller: 'Suchspiel'
})

View File

@@ -3,21 +3,21 @@ appControllers.controller('home', function($scope, $ionicPlatform, $cordovaMedia
$scope.showmentor=false;
$ionicPlatform.ready(function() {
var mediastartespiel1 = new Media('/android_asset/www/sounds/spiel1.mp3', spiel1_intro_finish,null);
$scope.mediastartespiel1=mediastartespiel1;
var mediastartesuchspiel = new Media('/android_asset/www/sounds/suchspiel.mp3', suchspiel_intro_finish,null);
$scope.mediastartesuchspiel=mediastartesuchspiel;
backgroundsounds_mediahandler.playbackgroundmusic();
});
$scope.spiel1_intro = function(){
$scope.suchspiel_intro = function(){
$scope.showmentor=true;
$scope.mediastartespiel1.play();
$scope.mediastartespiel1.setVolume('1.0');
$scope.mediastartesuchspiel.play();
$scope.mediastartesuchspiel.setVolume('1.0');
}
function spiel1_intro_finish() {
$scope.mediastartespiel1.release();
function suchspiel_intro_finish() {
$scope.mediastartesuchspiel.release();
$scope.showmentor=false;
$state.go('spiel1');
$state.go('suchspiel');
}
});