|
发表于 2010-5-28 12:02:56
|
显示全部楼层
你可以看一下相关的jass代码,很容易发现大小和速度的问题的
[codes=jass]function CreateTextTagUnitBJ takes string s, unit whichUnit, real zOffset, real size, real red, real green, real blue, real transparency returns texttag
set bj_lastCreatedTextTag = CreateTextTag()
call SetTextTagTextBJ(bj_lastCreatedTextTag, s, size)
call SetTextTagPosUnitBJ(bj_lastCreatedTextTag, whichUnit, zOffset)
call SetTextTagColorBJ(bj_lastCreatedTextTag, red, green, blue, transparency)
return bj_lastCreatedTextTag
endfunction[/codes]
[codes=jass]function SetTextTagTextBJ takes texttag tt, string s, real size returns nothing
local real textHeight = TextTagSize2Height(size)
call SetTextTagText(tt, s, textHeight)
endfunction[/codes]
[codes=jass]function TextTagSize2Height takes real size returns real
return size * 0.023 / 10
endfunction[/codes]
[codes=jass]function SetTextTagVelocityBJ takes texttag tt, real speed, real angle returns nothing
local real vel = TextTagSpeed2Velocity(speed)
local real xvel = vel * Cos(angle * bj_DEGTORAD)
local real yvel = vel * Sin(angle * bj_DEGTORAD)
call SetTextTagVelocity(tt, xvel, yvel)
endfunction[/codes]
[codes=jass]function TextTagSpeed2Velocity takes real speed returns real
return speed * 0.071 / 128
endfunction[/codes]
很明显这都是经过了转换的
至于位置问题,zOffset设置为0也是从头上开始么? |
|