Class: Collider
Collider is a component that defines a shape for detecting collisions with other Colliders.
Hierarchy
-
↳ Collider
Table of contents
Constructors
Properties
Methods
Constructors
constructor
+ new Collider(shape: IShape, enterScript?: string, exitScript?: string, currentlyCollidingWith?: IEntity[]): Collider
Parameters:
| Name | Type |
|---|---|
shape |
IShape |
enterScript? |
string |
exitScript? |
string |
currentlyCollidingWith |
IEntity[] |
Returns: Collider
Inherited from: Component
Properties
currentlyCollidingWith
• currentlyCollidingWith: IEntity[]
enterScript
• Optional enterScript: undefined | string
exitScript
• Optional exitScript: undefined | string
key
• key: string
shape
• shape: IShape
KEY
▪ Readonly Static KEY: collider= "collider"
MESSAGE_ADD
▪ Readonly Static MESSAGE_ADD: component_add= "component_add"
Inherited from: Component.MESSAGE_ADD
MESSAGE_REMOVE
▪ Readonly Static MESSAGE_REMOVE: component_remove= "component_remove"
Inherited from: Component.MESSAGE_REMOVE
Methods
Free
▸ Free(): void
Returns: void
Overrides: Component