http://ticore.blogspot.com/2011/01/as3-unique-random-number.html
三招都很cool!
尤其第三招用了Array.RETURNINDEXEDARRAY會回傳不重覆index array的特性.
超酷!!
Array.RETURNINDEXEDARRAY的用法可參考下面這篇~
http://blogs.adobe.com/actionscriptdocs/tag/returnindexedarray
Ticore大大還用Array.RETURNINDEXEDARRAY
實做簡潔的連續整數(0-n)array
http://ticore.blogspot.com/2011/01/as3-fast-way-generate-integer-sequence.html
沒有留言:
張貼留言