Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Pick random element


kvazmatik
 Share

Recommended Posts

Hi,

I'm still getting into phaser and javascript thing, and found this method (LINK) which return random element from array. But have no idea how to use it.

Can I do something like this ?

this.sound.play(Phaser.Math.RandomDataGenerator.Pick(['sfx_0', 'sfx_1', 'sfx_2']));

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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