|
发表于 2008-9-13 09:49:51
|
显示全部楼层
你如果愿意的话,可以这样:
[codes=jass]globals
integer PointNumber = 0
endglobals
function LocationXL takes real x, real y returns location
set PointNumber = PointNumber + 1
return Location(x,y)
endfunction
function OffsetLocationXL takes location loc, real dx, real dy returns location
set PointNumber = PointNumber + 1
return OffsetLocation(loc,x,y)
endfunction
function RemoveLocationXL takes location loc returns nothing
set PointNumber = PointNumber - 1
call RemoveLocation(loc)
endfunction
function GetUnitLocXL takes unit u returns location
set PointNumber = PointNumber + 1
return GetUnitLoc(u)
endfunction
function GetRandomLocInRectXL takes rect r returns location
set PointNumber = PointNumber + 1
return GetRandomLocInRect(r)
endfunction
function GetSpellTargetLocXL takes nothing returns location
set PointNumber = PointNumber + 1
return GetSpellTargetLoc()
endfunction
…………………………[/codes] |
|