mntouch eingebaut, dynamisches Hintergrundbild geadded

This commit is contained in:
Hilmer, Carsten
2016-11-22 10:56:57 +01:00
parent ec1a308629
commit 5e323b684d
9 changed files with 175 additions and 7 deletions

View File

@@ -1,11 +1,23 @@
// Ionic Starter App
//Global variable für alle Superglobalen Werte
window.globalVariable = {
//custom color style variable
color: {
appPrimaryColor: ""
},// End custom color style variable
backgroundimage: "img/Background/background.svg",
adMob: "ca-app-pub-3940256099942544/6300978111", //Use for AdMob API clientID.
adfree: ""
};// End Global variable
// 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','ngAnimate', 'ngDraggable', 'kinderspiel.controllers', 'kinderspiel.services'])
angular.module('kinderspiel', ['ionic', 'ngCordova','ngAnimate', 'ngDraggable', 'mn', 'kinderspiel.controllers', 'kinderspiel.services'])
.run(function($ionicPlatform, $state, backgroundsounds_mediahandler) {
.run(function($ionicPlatform, $rootScope, $state, backgroundsounds_mediahandler) {
$ionicPlatform.ready(function() {
@@ -38,6 +50,9 @@ angular.module('kinderspiel', ['ionic', 'ngCordova','ngAnimate', 'ngDraggable',
*/
//window.plugins.insomnia.allowSleepAgain();
//SetBackgroundpic
$rootScope.backgroundimage = window.globalVariable.backgroundimage;
/*
* Homebutton und Backgroundinfos abrufen
*/

View File

@@ -84,6 +84,8 @@ appControllers.controller('home', function($scope, $ionicPlatform, $cordovaMedia
$scope.animate_kornspeicher=function(){
//SetBackgroundpic
//$rootScope.backgroundimage = "img/ufo.png";
$scope.CSSKornspeicher=true;
$timeout(function () {
$scope.CSSKornspeicher=false;

View File

@@ -40,6 +40,10 @@ $ionicPlatform.ready(function() {
}
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=='backgroundmusic'){
backgroundsounds_mediahandler.setbackgroundsoundfile(data[i].sound);
@@ -51,7 +55,7 @@ $ionicPlatform.ready(function() {
});//$http
playsound('gamesound', $scope.gamesounds[0], minispielstart,'1.0');
});

View File

@@ -1,4 +1,4 @@
appControllers.controller('Suchspiel', function($scope, $ionicPlatform, $cordovaMedia, backgroundsounds_mediahandler, $state, $timeout,$q, $http) {
appControllers.controller('Suchspiel', function($scope, $ionicPlatform, $cordovaMedia, backgroundsounds_mediahandler, $state, $timeout,$q, $http) {
/*
@@ -30,7 +30,7 @@ $scope.CSSFalscheAntwort = false;
$scope.CCSInittimer = false;
//SpieleTimer
$scope.Spielzeit = 10;
$scope.Spielzeit = 90;
$scope.showgametimer = false;
//Spielzeit vorbei