teseo Posted December 16, 2014 Share Posted December 16, 2014 Hello, I am beginner in developing phaser. I have this code:var Constantia = { orientated: false} || {};Constantia.Boot = function(game) {};Constantia.Boot.prototype = { init: function () { this.input.maxPointers = 1; this.stage.disableVisibilityChange = true; if (this.game.device.desktop) { this.scale.scaleMode = Phaser.ScaleManager.RESIZE; this.scale.setResizeCallback(this.gameResized, this); this.scale.setMinMax(480, 260, 1024, 768); this.scale.pageAlignHorizontally = true; this.scale.pageAlignVertically = true; } else { this.scale.scaleMode = Phaser.ScaleManager.RESIZE; this.scale.setMinMax(480, 260, 1024, 768); this.scale.pageAlignHorizontally = true; this.scale.pageAlignVertically = true; this.scale.forceOrientation(true, false); this.scale.setResizeCallback(this.gameResized, this); this.scale.enterIncorrectOrientation.add(this.enterIncorrectOrientation, this); this.scale.leaveIncorrectOrientation.add(this.leaveIncorrectOrientation, this); } }, preload: function() { this.load.pack('Boot', '/constantia/phaser/assets.json'); }, create: function() { this.stage.backgroundColor = '#DDDDDD'; this.state.start('Preloader'); }, gameResized: function (width, height) { console.log("Redimension"); }, enterIncorrectOrientation: function () { this.orientated = false; document.getElementById('orientation').style.display = 'block'; }, leaveIncorrectOrientation: function () { this.orientated = true; document.getElementById('orientation').style.display = 'none'; }};but no resize and dont go responsive game Thank You community Link to comment Share on other sites More sharing options...
Recommended Posts