Jump to content

setInteractive() on a whole group


AdamRyanGameDev
 Share

Recommended Posts

I would like to make a group interactive.

The following did not work

groupOfZombies.setInteractive();

Then just to add the resulting code to discover which sprite was clicked needs to me access the sprite-key, i have been looking for it but I can't seem to find it (mainly because most code functions using 'this')

spriteCat2.setInteractive();
spriteCat2.on('pointerdown', function () {
			
   var thisSpriteName = this.key;
	console.log(thisSpriteName);

});

any help would be appreciated!

 

Link to comment
Share on other sites

  • 8 months later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...