Skip to content

Instantly share code, notes, and snippets.

@easierbycode
Created January 28, 2018 01:42
Show Gist options
  • Save easierbycode/f2e7773b7a5550a7b0e60c387ce238a6 to your computer and use it in GitHub Desktop.
Save easierbycode/f2e7773b7a5550a7b0e60c387ce238a6 to your computer and use it in GitHub Desktop.
var game;
window.onload = function() {
var isMobile = navigator.userAgent.indexOf("Mobile");
if (isMobile == -1) {
game = new Phaser.Game(480, 640, Phaser.AUTO, "ph_game");
} else {
game = new Phaser.Game(window.innerWidth, window.innerHeight, Phaser.AUTO, "ph_game");
}
game.state.add("StateMain", StateMain);
game.state.start("StateMain");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment