Chupup Games Posted January 31, 2014 Share Posted January 31, 2014 Where in the documentation can I find this functions? I searched under the Game class, but didn't find anything. var game = new Phaser.Game(..., { preload: preload, create: create}) What happens here? Is preload (the 1.) one Variable and the 2. preload is the function assigned to it? Why is it not: preload: preload() ? I think this is one basic javascript thing, but i couldn't find more information about this. Can somebody please point me to this topic in the Javascript Documentation, where I can find one explanation about this? Thanks Link to comment Share on other sites More sharing options...
rich Posted February 1, 2014 Share Posted February 1, 2014 Preload() (with braces) would have invoked the function immediately. Without braces just stores a reference to it which phaser calls later once it has finished booting. Link to comment Share on other sites More sharing options...
jerome Posted February 1, 2014 Share Posted February 1, 2014 some clues here : https://github.com/photonstorm/phaser/wiki/Phaser-General-Documentation-:-Game Link to comment Share on other sites More sharing options...
Chupup Games Posted February 1, 2014 Author Share Posted February 1, 2014 Thanks for the answers, i also should have looked here first: http://www.html5gamedevs.com/topic/1372-phaser-function-order-reserved-names-and-special-uses/ Link to comment Share on other sites More sharing options...
Recommended Posts