I have a phaser game that I want to kinda implement in a ionic app. My ideia is to run the phaser game from a external link and create a button inside the ionic app that links to the game and launches from the InAppBrowser or the Cordova web view as explained here.
I have no problems running the phaser game in the mobile browser (chrome), but when it launches from the app with either the InAppBrowser or the Cordova web view the game is small.
Also, I can't click on the buttons.
Any ideia what the problem might be? In the phaser game, or in the app...
It runs well in the browser.
Link to the game: works on firefox and on mobile.
(function() {
var game = new Phaser.Game(JOGO.area.width, JOGO.area.height, Phaser.CANVAS, 'game');
// -- gamestates
game.state.add('loading', JOGO.loading);
game.state.add('preload', JOGO.preload);
game.state.add('menu', JOGO.menu);
game.state.add('levelSelect', JOGO.levelSelect);
game.state.add('jogo', JOGO.jogo);
game.state.add('fim', JOGO.fim);
game.state.start('loading');
})();
Play button:
var jogar = this.game.add.button(this.game.width / 2, this.game.height - this.game.height/4, "jogar");
jogar.anchor.set(0.5);
menuGroup.add(jogar);
jogar.state = "levelSelect";
jogar.events.onInputDown.add(this.onSpriteDown, this);
jogar.events.onInputOver.add(this.onSpriteOver, this);
