|
发表于 2010-1-25 18:22:28
|
显示全部楼层
仅表示个人意见:
单位的颜色是完全可以不同步的。
一个小小的示例代码:
[jass]
function ColorUnit takes unit u returns nothing
local player p = null
local integer i = 0
loop
exitwhen i >= 12
set p = Player( i )
if IsUnitAlly( u, p ) then
if GetLocalPlayer() == p then
call SetUnitVertexColor( u, 0, 0, 255, 255 )
endif
else
if GetLocalPlayer() == p then
call SetUnitVertexColor( u, 255, 255, 255, 255 )
endif
endif
set i = i + 1
endloop
endfunction
[/jass] |
|