Pular para o conteúdo

getColPolygonPointPosition

Compartilhada Colshapes OOP colshape:getPointPosition(...)

Lê a posição de um vértice específico.

number, number getColPolygonPointPosition ( colshape oShape, number indice )
NomeTipoPadrãoDescrição
oShapecolshape—O polígono.
indicenumber—Posição do vértice, começando em 1.

O X e o Y do vértice, ou false (com um aviso) se o índice não existir. Gera um erro Lua se a forma não for um polígono ou se indice faltar, não for um número ou for negativo.

local x, y = getColPolygonPointPosition(territorio, 2)