Jump to content

K so stuck and i am sure its simple. Scale Iphone not triggering


lenlac
 Share

Recommended Posts

So i have been playing around with the template for full screen provided in the repository.

I can get to load and get to the main menu state. In the main menu state it seem not resize to the right property. the screen is only shows from like x 0 to x 300 and y 0 to y 300.

 

Seems like the camera is smaller, i am but sure why is taking place. Any hints would be welcomed. I tried exact fit and that didnt work either.

 

I am previewing on a iphone 6.
 

BasicGame = {    /* Here we've just got some global level vars that persist regardless of State swaps */    score: 0,    /* If the music in your game needs to play through-out a few State swaps, then you could reference it here */    music: null,    /* Your game can check BasicGame.orientated in internal loops to know if it should pause or not */    orientated: false};BasicGame.Boot = function (game) {};BasicGame.Boot.prototype = {    init: function () {        this.input.maxPointers = 1;        this.stage.disableVisibilityChange = true;        if (this.game.device.desktop)        {            this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;            this.scale.setMinMax(480, 260, 1024, 768);            this.scale.pageAlignHorizontally = true;            this.scale.pageAlignVertically = true;        }        else        {            this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;            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 () {        //  Here we load the assets required for our preloader (in this case a background and a loading bar)        this.load.image('preloaderBackground', 'images/preloader_background.png');        this.load.image('preloaderBar', 'images/preload.png');    },    create: function () {        this.state.start('Preloader');    },    gameResized: function (width, height) {        //  This could be handy if you need to do any extra processing if the game resizes.        //  A resize could happen if for example swapping orientation on a device or resizing the browser window.        //  Note that this callback is only really useful if you use a ScaleMode of RESIZE and place it inside your main game state.    },    enterIncorrectOrientation: function () {        BasicGame.orientated = false;        document.getElementById('orientation').style.display = 'block';    },    leaveIncorrectOrientation: function () {        BasicGame.orientated = true;        document.getElementById('orientation').style.display = 'none';    }};
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...