Athena.extensions.extColshape.PolygonShape ​
server/extensions/extColshape.PolygonShape
Hierarchy ​
↳
PolygonShape
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 ​
| Name | Type | Default value | Description |
|---|---|---|---|
minZ | number | undefined | The floor level of the polygon |
maxZ | number | undefined | The max height of the polygon |
vertices | IVector2[] | IVector3[] | undefined | An array of x, y to determine where to draw the polygon around |
isPlayerOnly | boolean | undefined | - |
isVehicleOnly | boolean | undefined | - |
debug | boolean | false | - |
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 ​
| Name | Type |
|---|---|
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 ​
| Name | Type |
|---|---|
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 ​
| Name | Type |
|---|---|
entity | Entity |
Returns ​
void
Defined in ​
server/extensions/extColshape.ts:106
invokeLeaveCallbacks ​
Usage
Athena.extensions.extColshape.PolygonShape.invokeLeaveCallbacks(entity): void
Parameters ​
| Name | Type |
|---|---|
entity | Entity |
Returns ​
void
V5 Docs