|
发表于 2007-10-5 05:46:55
|
显示全部楼层
厄,那我写段代码玩玩:
[codes=jass]
globals
constant integer MaxSize=256
endglobals
function GetUnitCollisionSize takes unit u returns integer
local integer dis=0
loop
set dis=dis+2
exitwhen IsUnitInRangeXY(u,GetUnitX(u)+MaxSize,GetUnitY(u),dis) or dis>MaxSize
endloop
return MaxSize-dis
endfunction
[/codes]
原来IsUnitInRangeXY和IsUnitInRangLoc一样的嘛,谁说IsUnitInRangeXY不考虑碰撞来着 |
|