|
发表于 2008-7-7 16:49:22
|
显示全部楼层
可以传递 这就是我提出的C2I系统 往code上绑定数据
附上演示 光环系统
简要说明
[codes=jass]function C2I takes code c returns integer
return c
return 0
endfunction
function I2C takes integer i returns code
return i
return null
endfunction
function Attack takes nothing returns nothing
local unit u=I2U(GetStoredInteger(udg_GC,I2S(C2I(function Attack)),"Unit"))
call IssueTargetOrder(GetEnumUnit(),"attack",u)
set u=null
endfunction
//……
local unit u=CreateUnit(xxx)
call StoreInteger(udg_GC,I2S(C2I(function Attack )),"Unit",H2I(u))
call ForGroup(targetgroup,function Attack) [/codes]
——everguo |
|