Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* global Phaser */
- BasicGame = {
- //possible global variables
- };
- BasicGame.Preload = function (game) {
- };
- BasicGame.Preload.prototype = {
- init: function () {
- this.input.maxPointers = 1;
- this.stage.disableVisibilityChange = true;
- this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;
- this.scale.pageAlignHorizontally = true;
- this.scale.forceOrientation(true, false);
- this.scale.setResizeCallback(this.gameResized, this);
- this.scale.setScreenSize(true);
- this.scale.refresh();
- },
- //preload assets etc.
- preload: function () {
- this.game.load.image('tausta', 'assets/tausta.png');
- this.game.load.image('food', 'assets/food.png');
- this.game.load.image('goal', 'assets/goal.png');
- this.game.load.image('monster', 'assets/monster.png');
- this.game.load.image('player', 'assets/player1.png');
- },
- create: function () {
- this.game.state.start('Level1');
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement