HU/getColShapeType

From Multi Theft Auto: Wiki
Revision as of 10:34, 10 October 2018 by Surge (talk | contribs) (→‎Példa)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Ez a function a colshape típusának lekéréséhez használható.

Szintaxis

string getColShapeType ( colshape shape )  

OOP Syntax Help! I don't understand this!

Method: colshape:getShapeType(...)
Variable: .shapeType


Kötelező paraméterek

  • shape: A colshape, amelynek a típusát szeretné megkapni.

Visszatérési érték

Visszaad egy string-et, amely tartlamazza a colshape típusát, false, ha érvénytelen paraméterek lettek megadva.

Példa

Ez a példa kiírja a colshape összes típusát.

local circle = createColCircle(0, 0, 1)
local cubboid = createColCuboid(0, 0, 0, 0, 0, 0)
local sphere = createColSphere(0, 0, 0, 0)
local rectangle = createColRectangle(0, 0, 0, 0)
local polygon = createColPolygon(0, 0, 0, 0, 0, 0, 0, 0)
local tube = createColTube(0, 0, 0, 0, 0)

iprint("circle", getColShapeType(circle), circle:getShapeType(), circle.shapeType)
iprint("cubboid", getColShapeType(cubboid), cubboid:getShapeType(), cubboid.shapeType)
iprint("sphere", getColShapeType(sphere), sphere:getShapeType(), sphere.shapeType)
iprint("rectangle", getColShapeType(rectangle), rectangle:getShapeType(), rectangle.shapeType)
iprint("polygon", getColShapeType(polygon), polygon:getShapeType(), polygon.shapeType)
iprint("tube", getColShapeType(tube), tube:getShapeType(), tube.shapeType)

Lásd még

Fordította