jass——group的使用
生活随笔
收集整理的這篇文章主要介紹了
jass——group的使用
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
group發(fā)現(xiàn)效率很低,如果經(jīng)常調(diào)用會(huì)導(dǎo)致延遲,盡量不要用group。也可能是我用的不對(duì)。但是感覺(jué)效率真的很低。
?//觸發(fā)的玩家
local player player_temp = GetTriggerPlayer()
//獲取該玩家選中的所有單位。
local group my_units = GetUnitsSelectedAll(player_temp)
//遍歷組
call ForGroupBJ(my_units,function bianliGroup)
//遍歷組函數(shù)
function bianliGroup takes nothing returns nothing
local unit selectUnit = GetEnumUnit() //被選擇的單位
?//該單位如果對(duì)該玩家不可見(jiàn),但該玩家又選中了該單位。
if IsUnitInvisible(selectUnit, ?GetTriggerPlayer() ) then?
endif
endfunction
總結(jié)
以上是生活随笔為你收集整理的jass——group的使用的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 评测三款最流行的azw3阅读器
- 下一篇: MSYS2安装