Created
January 28, 2018 01:42
-
-
Save easierbycode/f2e7773b7a5550a7b0e60c387ce238a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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