diff --git a/registration-system/view/signups/game1/index.php b/registration-system/view/signups/game1/index.php index 2b4be33ca534f34115b5480dbd3944731299d22f..2a06eee3d662988f2ae6ab122a5b976f4923da26 100644 --- a/registration-system/view/signups/game1/index.php +++ b/registration-system/view/signups/game1/index.php @@ -76,8 +76,6 @@ class Game1SignupMethod extends SignupMethod { <script> g_smallValue = 0.000001; // fun with floats - var FAPI = new FAPI(); - var game = new Game({ startMap: \'map_landing\', showEventLayers: false, diff --git a/registration-system/view/signups/game1/js/achievements.js b/registration-system/view/signups/game1/js/achievements.js index 6e9a389f72b18e1cd8ce379ec42fe8b9082aa19a..843d25c2b82e47369cdc03a8380fe701b449fb48 100644 --- a/registration-system/view/signups/game1/js/achievements.js +++ b/registration-system/view/signups/game1/js/achievements.js @@ -213,7 +213,7 @@ Achievements.prototype.updateStatusText = function () { }; Achievements.prototype.logMessage = function (message) { - if (Environment.sound.achievements) new Audio(FAPI.resolvePath('sounds/ding.ogg')).play(); + if (Environment.sound.achievements) new Audio(Environment.fapi.resolvePath('sounds/ding.ogg')).play(); var list = this.getDomElem('log'); var newElem = document.createElement('li'); diff --git a/registration-system/view/signups/game1/js/character.js b/registration-system/view/signups/game1/js/character.js index 96418a04e0a305aa9b0fa97adbada67fbe724cd3..ae4045e6298bcb17974b7f1422625a26701f0949 100644 --- a/registration-system/view/signups/game1/js/character.js +++ b/registration-system/view/signups/game1/js/character.js @@ -9,7 +9,7 @@ function Char(svg, options) { this.loaded = false; var self = this; - d3.xml(FAPI.resolvePath('chars/bernd.svg'), 'image/svg+xml', function(xml) { + d3.xml(Environment.fapi.resolvePath('chars/bernd.svg'), 'image/svg+xml', function(xml) { self.image = self.svg.append('g').attr('id', 'player'); var layers = d3.select(xml.documentElement).selectAll('g').filter(function() { return this.getAttribute('inkscape:groupmode') == 'layer'; diff --git a/registration-system/view/signups/game1/js/game.js b/registration-system/view/signups/game1/js/game.js index f5b44397e01ecde5d5c0e59f47bce65f763ce815..68e1652053e33c4e19bb8c2d404b22c056b1873a 100644 --- a/registration-system/view/signups/game1/js/game.js +++ b/registration-system/view/signups/game1/js/game.js @@ -66,7 +66,7 @@ Game.prototype.loadMap = function (map, spawn) { function initMap(mapId, spawn, done) { console.log('Init map: ' + mapId + ' spawn: ' + spawn); - d3.xml(FAPI.resolvePath('maps/' + mapId + '.svg'), 'image/svg+xml', function (xml) { + d3.xml(Environment.fapi.resolvePath('maps/' + mapId + '.svg'), 'image/svg+xml', function (xml) { gameCanvas.style.width = Game.config.size[0] + 'px'; gameCanvas.style.height = Game.config.size[1] + 'px'; gameRoot.appendChild(xml.documentElement); @@ -170,7 +170,7 @@ Game.prototype.loadMap = function (map, spawn) { }; Game.log = function (message) { - if (Environment.sound.log) new Audio(FAPI.resolvePath('sounds/plop.ogg')).play(); + if (Environment.sound.log) new Audio(Environment.fapi.resolvePath('sounds/plop.ogg')).play(); var list = document.getElementById('game-log'); var newElem = document.createElement('li'); diff --git a/registration-system/view/signups/game1/js/story.js b/registration-system/view/signups/game1/js/story.js index e038bb1428ff82c89982f4a3625fad0e5c580287..9e19a6260d4caea9a402d8c7dd5b7d1c75e7f44e 100644 --- a/registration-system/view/signups/game1/js/story.js +++ b/registration-system/view/signups/game1/js/story.js @@ -182,7 +182,7 @@ Story.actions = { action: function () { Game.actionsBlocked = true; var blackboardForm = '' + - '<div id="fs_board" style="background-image: url(' + FAPI.resolvePath('graphics/fs_blackboard.png') + ');background-color: #385123;background-repeat: no-repeat;height:300px;width: 555px;position: absolute; top: 150px;left: 120px;">' + + '<div id="fs_board" style="background-image: url(' + Environment.fapi.resolvePath('graphics/fs_blackboard.png') + ');background-color: #385123;background-repeat: no-repeat;height:300px;width: 555px;position: absolute; top: 150px;left: 120px;">' + ' <div style="margin: 70px; font-size: 15pt; font-family: \'Comic Sans MS\', cursive, sans-serif;color:white">' + ' <div style="float:left">' + ' <div id="fs_board_name_given_label">Vorname:</div>' + @@ -907,7 +907,7 @@ Story.actions = { Environment.progress.ufer_pickedTransport = true; Game.actionsBlocked = true; Game.char.image.style('opacity', '0'); - new Audio(FAPI.resolvePath('sounds/plop.ogg')).play(); + new Audio(Environment.fapi.resolvePath('sounds/plop.ogg')).play(); Story.credits(); } else { diff --git a/registration-system/view/signups/game1/test.html b/registration-system/view/signups/game1/test.html index b203f180a782d2c3f980e01ec0a956bbf7aad036..07020027f42f85a47396e841c81bdf901aec7a3d 100644 --- a/registration-system/view/signups/game1/test.html +++ b/registration-system/view/signups/game1/test.html @@ -62,8 +62,8 @@ </div> <script> g_smallValue = 0.000001; // fun with floats - var FAPI = new FAPI(); - FAPI.methodBasepath = ''; + + Environment.fapi.methodBasepath = ''; var maps = ['map_landing', 'castle_entrance', 'castle_fs', 'dorf', 'shop', 'ufer']; var game = new Game({