[問題] hittest 多重判斷

看板Flash作者 (HWG)時間18年前 (2008/05/28 09:29), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串1/1
假設今天有很多顆球同時在螢幕上動,任何一顆碰到對方就會反彈, 假如有10顆球,在每顆球的as裡該怎寫 hittest? 總不能真的寫九行hittest吧? 有沒有類似 if (_root.anymovieclip.hitTest(me)) 或 if (hitTest(_root.anymovieClip))之類的用法? 上面兩個只是例子,當然官方沒有這個用法,不過該如何呈現? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.120.174.130

05/28 09:47, , 1F
for迴圈判斷
05/28 09:47, 1F

05/30 10:36, , 2F
for跟_root[]
05/30 10:36, 2F
文章代碼(AID): #18FBLTDh (Flash)
文章代碼(AID): #18FBLTDh (Flash)