PhysicsEntity
Inherits from GameEntity
Summary
Constructors
Properties
Methods
Constructors
PhysicsEntity
PhysicsEntity(other: EntityBusPeer)
Parameters
PhysicsEntity
PhysicsEntity(other: Entity)
Parameters
Name |
Type |
Description |
other |
Entity |
|
PhysicsEntity
PhysicsEntity(other: SpatialEntity)
Parameters
PhysicsEntity
PhysicsEntity(other: GameEntity)
Parameters
Properties
internalHealth
float
velocity
Vec3
defaultMaterial
DataContainer | nil
belongsInPhysicsWorld
bool
isPredestructible
bool
physicsEntityBase
PhysicsEntityBase | nil
Methods
GetMaterial
GetMaterial(position: Vec3): DataContainer | nil
Parameters
Name |
Type |
Description |
position |
Vec3 |
|
Returns
SetActiveHealthState
SetActiveHealthState(state: int)
Parameters
Name |
Type |
Description |
state |
int |
|
ApplyDamage
ApplyDamage(damageInfo: DamageInfo)
Parameters
ApplyImpulse
ApplyImpulse(impulseData: ImpulseData)
Parameters
RegisterCollisionCallback
RegisterCollisionCallback(callback: callable): int
Parameters
Name |
Type |
Description |
callback |
callable |
A callback in the form function(entity: Entity, info: CollisionInfo): bool . |
Returns
RegisterCollisionCallback
RegisterCollisionCallback(context: any, callback: callable): int
Parameters
Name |
Type |
Description |
context |
any |
A context value to pass to the callback. |
callback |
callable |
A callback in the form function(context: any, entity: Entity, info: CollisionInfo): bool . |
Returns
UnregisterCollisionCallback
UnregisterCollisionCallback(handle: int)
Parameters
Name |
Type |
Description |
handle |
int |
|
RegisterDamageCallback
RegisterDamageCallback(callback: callable): int
Parameters
Name |
Type |
Description |
callback |
callable |
A callback in the form function(entity: Entity, damageInfo: DamageInfo, damageGiverInfo: DamageGiverInfo | nil): bool . |
Returns
RegisterDamageCallback
RegisterDamageCallback(context: any, callback: callable): int
Parameters
Name |
Type |
Description |
context |
any |
A context value to pass to the callback. |
callback |
callable |
A callback in the form function(context: any, entity: Entity, damageInfo: DamageInfo, damageGiverInfo: DamageGiverInfo | nil): bool . |
Returns
UnregisterDamageCallback
UnregisterDamageCallback(handle: int)
Parameters
Name |
Type |
Description |
handle |
int |
|
RegisterInteractCallback
RegisterInteractCallback(callback: callable): int
Parameters
Name |
Type |
Description |
callback |
callable |
A callback in the form function(entity: Entity, soldier: SoldierEntity | nil): bool . |
Returns
RegisterInteractCallback
RegisterInteractCallback(context: any, callback: callable): int
Parameters
Name |
Type |
Description |
context |
any |
A context value to pass to the callback. |
callback |
callable |
A callback in the form function(context: any, entity: Entity, soldier: SoldierEntity | nil): bool . |
Returns
UnregisterInteractCallback
UnregisterInteractCallback(handle: int)
Parameters
Name |
Type |
Description |
handle |
int |
|
RegisterImpulseCallback
RegisterImpulseCallback(callback: callable): int
Parameters
Name |
Type |
Description |
callback |
callable |
A callback in the form function(entity: Entity, impulseData: ImpulseData | nil): bool . |
Returns
RegisterImpulseCallback
RegisterImpulseCallback(context: any, callback: callable): int
Parameters
Name |
Type |
Description |
context |
any |
A context value to pass to the callback. |
callback |
callable |
A callback in the form function(context: any, entity: Entity, impulseData: ImpulseData | nil): bool . |
Returns
UnregisterImpulseCallback
UnregisterImpulseCallback(handle: int)
Parameters
Name |
Type |
Description |
handle |
int |
|