Startup

Startup

Methods


Blockly.JavaScript['phaser_simple_init'](width, height)



The main controller for the entire Phaser game. The functions run in order from top to bottom, with preload and create running once, and update running as a loop until the game ends. Check the game engine documentation for more details.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
width Number

The width of the game world

height Number

The height of the game world

Code Equivalent:
undefined

center_and_stretch()

Code Equivalent:
game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;  this.scale.pageAlignHorizontally = true;  this.scale.pageAlignVertically = true;  this.scale.updateLayout( true );

start_phaser_for_states(width, height)


The main controller for the entire Phaser game. Starts an instance of phaser without using preload, create, and update.

Check out the third party documentation for a more in depth explanation.

Parameters:
Name Type Description
width Number

The width of the game world

height Number

The height of the game world

Code Equivalent:
var game = new Phaser.Game(number_width, number_height, Phaser.AUTO, '');