Le Twitch Posted July 26, 2014 Share Posted July 26, 2014 Main.Game.prototype = { create: function() { var square = this.add.group(); var squareA = this.add.sprite(55, 370, 'colourSquare', 'red'); var squareB = this.add.sprite(675, 370, 'colourSquare', 'blue'); square.add(squareA); square.add(squareB); square.setALL('inputEnabled', true); }};this is the code i used Link to comment Share on other sites More sharing options...
lewster32 Posted July 26, 2014 Share Posted July 26, 2014 It's setAll, not setALL - JavaScript is case sensitive. Link to comment Share on other sites More sharing options...
Le Twitch Posted July 26, 2014 Author Share Posted July 26, 2014 It's setAll, not setALL - JavaScript is case sensitive. hmm i read somewhere that it was "setALL". i probably misread it Link to comment Share on other sites More sharing options...
lewster32 Posted July 26, 2014 Share Posted July 26, 2014 Nope, it's definitely setAll This style of naming is called 'camelCase' as it uses a lowercase first letter, then an uppercase letter to denote each separate word to make it easier to read. Le Twitch 1 Link to comment Share on other sites More sharing options...
wayfinder Posted July 26, 2014 Share Posted July 26, 2014 ...although only sometimes: Phaser.Color.RGBtoString lewster32 1 Link to comment Share on other sites More sharing options...
lewster32 Posted July 26, 2014 Share Posted July 26, 2014 ... unless the word is an initialism or acronym, or the item in question is part of a namespace or a 'class' name Link to comment Share on other sites More sharing options...
Recommended Posts