Skip to content
On this page

Athena.extensions.extColshape.PolygonShape

server/extensions/extColshape.PolygonShape

Hierarchy

Constructors

constructor

new PolygonShape(minZ, maxZ, vertices, isPlayerOnly, isVehicleOnly, debug?)

Creates an expensive instance of PolygonShape.

Enter / Exit can be fetched with 'entityEnterColshape' and 'entityLeaveColshape' events

Parameters

NameTypeDefault valueDescription
minZnumberundefinedThe floor level of the polygon
maxZnumberundefinedThe max height of the polygon
verticesIVector2[] | IVector3[]undefinedAn array of x, y to determine where to draw the polygon around
isPlayerOnlybooleanundefined-
isVehicleOnlybooleanundefined-
debugbooleanfalse-

Overrides

alt.ColshapePolygon.constructor

Defined in

server/extensions/extColshape.ts:77

Properties

enterCallbacks

Private enterCallbacks: (shape: PolygonShape, entity: any) => void[] = []

Defined in

server/extensions/extColshape.ts:64


isDebug

isDebug: boolean = false

Defined in

server/extensions/extColshape.ts:62


isPlayerOnly

isPlayerOnly: boolean

Defined in

server/extensions/extColshape.ts:59


isPolygonShape

isPolygonShape: boolean = true

Defined in

server/extensions/extColshape.ts:61


isVehicleOnly

isVehicleOnly: boolean

Defined in

server/extensions/extColshape.ts:60


leaveCallbacks

Private leaveCallbacks: (shape: PolygonShape, entity: any) => void[] = []

Defined in

server/extensions/extColshape.ts:65


uid

uid: string

Defined in

server/extensions/extColshape.ts:57


vertices

vertices: IVector2[]

Defined in

server/extensions/extColshape.ts:58

Methods

addEnterCallback

Usage

Athena.extensions.extColshape.PolygonShape.addEnterCallback(callback): void

Parameters

NameType
callback(shape: PolygonShape, entity: any) => void

Returns

void

Defined in

server/extensions/extColshape.ts:98


addLeaveCallback

Usage

Athena.extensions.extColshape.PolygonShape.addLeaveCallback(callback): void

Parameters

NameType
callback(shape: PolygonShape, entity: any) => void

Returns

void

Defined in

server/extensions/extColshape.ts:102


invokeEnterCallbacks

Usage

Athena.extensions.extColshape.PolygonShape.invokeEnterCallbacks(entity): void

Parameters

NameType
entityEntity

Returns

void

Defined in

server/extensions/extColshape.ts:106


invokeLeaveCallbacks

Usage

Athena.extensions.extColshape.PolygonShape.invokeLeaveCallbacks(entity): void

Parameters

NameType
entityEntity

Returns

void

Defined in

server/extensions/extColshape.ts:112

Created by Stuyk | Est. 2020