Le Twitch Posted October 14, 2014 Share Posted October 14, 2014 Does group.addMultiple work the same as group.add, except you can add all the objects to the group in one line? If so, how do you write it? Link to comment Share on other sites More sharing options...
Alvin Posted October 14, 2014 Share Posted October 14, 2014 Hi, It expects an array of children objects to be passed to it, it's exactly like doing group.add multiple times, it's just a for loop internally. So you use it like this : group.addMultiple([sprite1,sprite2,etc]) Link to comment Share on other sites More sharing options...
Le Twitch Posted October 14, 2014 Author Share Posted October 14, 2014 Hi,It expects an array of children objects to be passed to it, it's exactly like doing group.add multiple times, it's just a for loop internally.So you use it like this :group.addMultiple([sprite1,sprite2,etc]) Ahh okay. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts