Class: CDestroyablePhysicsObject
Destroyable animated physics object.
Source
src/xrGame/PhysicObject_script.cpp, CDestroyablePhysicsObject binding.
Custom Constructor
CDestroyablePhysicsObject
Remarks
Registered as a CPhysicObject subclass. It inherits the animated physics helpers and participates in destroyable object callbacks through the engine object lifecycle.
Extends
Constructors
Constructor
protected new CDestroyablePhysicsObject(): CDestroyablePhysicsObject;Engine-created base object.
Returns
CDestroyablePhysicsObject
Inherited from
Methods
_construct()
_construct(): DLL_Pure;Construct engine-side object state.
Returns
Constructed base object.
Remarks
Lifecycle hook used by the engine. Calling it from gameplay scripts can reinitialize native state unexpectedly.
Inherited from
anim_time_get()
anim_time_get(): number;Returns
number
Current animation time.
Inherited from
anim_time_set()
anim_time_set(time: number): void;Set current animation time.
Parameters
| Parameter | Type | Description |
|---|---|---|
time | number | Animation time. |
Returns
void
Inherited from
getEnabled()
getEnabled(): boolean;Returns
boolean
Whether the object is enabled in the client object loop.
Inherited from
getVisible()
getVisible(): boolean;Returns
boolean
Whether the object is visible.
Inherited from
net_Export()
net_Export(net_packet: net_packet): void;Export network state to a packet.
Parameters
| Parameter | Type | Description |
|---|---|---|
net_packet | net_packet | Destination network packet. |
Returns
void
Inherited from
net_Import()
net_Import(net_packet: net_packet): void;Import network state from a packet.
Parameters
| Parameter | Type | Description |
|---|---|---|
net_packet | net_packet | Source network packet. |
Returns
void
Inherited from
net_Spawn()
net_Spawn(cse_abstract: cse_abstract): boolean;Spawn the client object from its server object.
Parameters
| Parameter | Type | Description |
|---|---|---|
cse_abstract | cse_abstract | Server object used for spawn data. |
Returns
boolean
Whether spawn succeeded.
Remarks
Lifecycle hook used during network spawn. Return false to reject spawn in custom subclasses.
Inherited from
play_bones_sound()
play_bones_sound(): void;Start sounds attached to animated bones.
Returns
void
Inherited from
CPhysicObject.play_bones_sound
run_anim_back()
run_anim_back(): void;Run the object animation backward.
Returns
void
Inherited from
run_anim_forward()
run_anim_forward(): void;Run the object animation forward.
Returns
void
Inherited from
CPhysicObject.run_anim_forward
set_door_ignore_dynamics()
set_door_ignore_dynamics(): void;Ignore dynamic objects while the door-like object is moving.
Returns
void
Inherited from
CPhysicObject.set_door_ignore_dynamics
stop_anim()
stop_anim(): boolean;Stop the current object animation.
Returns
boolean
Whether animation was stopped.
Inherited from
stop_bones_sound()
stop_bones_sound(): void;Stop sounds attached to animated bones.
Returns
void
Inherited from
CPhysicObject.stop_bones_sound
unset_door_ignore_dynamics()
unset_door_ignore_dynamics(): void;Restore normal dynamic-object collision handling.
Returns
void
Inherited from
CPhysicObject.unset_door_ignore_dynamics
use()
use(object: CGameObject): boolean;Use another object through the engine interaction path.
Parameters
| Parameter | Type | Description |
|---|---|---|
object | CGameObject | Object being used. |
Returns
boolean
Whether the use action was handled.
Inherited from
Visual()
Visual(): IXR_IRender_Visual;Returns
Render visual assigned to the object.
Inherited from
Properties
__name
readonly __name: string;LuaBind instance constructor name.
Inherited from
__name
readonly static __name: string;LuaBind class constructor name.