Skip to content

有用的转换

Cook Green edited this page Dec 18, 2019 · 2 revisions

WPos -> CPos

CPos cpos = actor.World.Map.CellContaining(wpos)

CPos -> WPos

WPos wpos = actor.World.Map.CenterOfCell(cpos)

WPos -> Target

Target target = Target.FromPos(wpos)

Target -> WPos

WPos wpos = Target.CenterPosition

int -> WDist

WDist wdist = WDist.FromCells(intvalue)

WDist -> int

int intvalue = wdist.length / 1024