Class: MockPhysicObject
Mock of the X-Ray engine CPhysicObject.
Extends
MockCGameObject
Implements
CPhysicObject
Constructors
Constructor
new MockPhysicObject(): MockPhysicObject;Returns
MockPhysicObject
Inherited from
MockCGameObject.constructorMethods
create()
static create(): MockPhysicObject;Returns
MockPhysicObject
Overrides
MockCGameObject.createmock()
static mock(): CPhysicObject;Returns
CPhysicObject
Overrides
MockCGameObject.mockProperties
__name
__name: string = "CGameObject";LuaBind instance constructor name.
Implementation of
CPhysicObject.__nameInherited from
MockCGameObject.__name_construct
_construct: MockedFunction<() => DLL_Pure>;Construct engine-side object state.
Remarks
Lifecycle hook used by the engine. Calling it from gameplay scripts can reinitialize native state unexpectedly.
Returns
Constructed base object.
Implementation of
CPhysicObject._constructInherited from
MockCGameObject._constructanim_time_get
anim_time_get: Mock<() => number>;Returns
Current animation time.
Implementation of
CPhysicObject.anim_time_getanim_time_set
anim_time_set: Mock<(time: number) => void>;Set current animation time.
Param
time
Animation time.
Implementation of
CPhysicObject.anim_time_setanimationTime
animationTime: number = 0;getEnabled
getEnabled: MockedFunction<() => boolean>;Returns
Whether the object is enabled in the client object loop.
Implementation of
CPhysicObject.getEnabledInherited from
MockCGameObject.getEnabledgetVisible
getVisible: MockedFunction<() => boolean>;Returns
Whether the object is visible.
Implementation of
CPhysicObject.getVisibleInherited from
MockCGameObject.getVisiblenet_Export
net_Export: MockedFunction<(net_packet: net_packet) => void>;Export network state to a packet.
Param
net_packet
Destination network packet.
Implementation of
CPhysicObject.net_ExportInherited from
MockCGameObject.net_Exportnet_Import
net_Import: MockedFunction<(net_packet: net_packet) => void>;Import network state from a packet.
Param
net_packet
Source network packet.
Implementation of
CPhysicObject.net_ImportInherited from
MockCGameObject.net_Importnet_Spawn
net_Spawn: MockedFunction<(cse_abstract: cse_abstract) => boolean>;Spawn the client object from its server object.
Remarks
Lifecycle hook used during network spawn. Return false to reject spawn in custom subclasses.
Param
cse_abstract
Server object used for spawn data.
Returns
Whether spawn succeeded.
Implementation of
CPhysicObject.net_SpawnInherited from
MockCGameObject.net_Spawnplay_bones_sound
play_bones_sound: Mock<UnknownFunction>;Start sounds attached to animated bones.
Implementation of
CPhysicObject.play_bones_soundrun_anim_back
run_anim_back: Mock<UnknownFunction>;Run the object animation backward.
Implementation of
CPhysicObject.run_anim_backrun_anim_forward
run_anim_forward: Mock<UnknownFunction>;Run the object animation forward.
Implementation of
CPhysicObject.run_anim_forwardset_door_ignore_dynamics
set_door_ignore_dynamics: Mock<UnknownFunction>;Ignore dynamic objects while the door-like object is moving.
Implementation of
CPhysicObject.set_door_ignore_dynamicsstop_anim
stop_anim: Mock<() => boolean>;Stop the current object animation.
Returns
Whether animation was stopped.
Implementation of
CPhysicObject.stop_animstop_bones_sound
stop_bones_sound: Mock<UnknownFunction>;Stop sounds attached to animated bones.
Implementation of
CPhysicObject.stop_bones_soundunset_door_ignore_dynamics
unset_door_ignore_dynamics: Mock<UnknownFunction>;Restore normal dynamic-object collision handling.
Implementation of
CPhysicObject.unset_door_ignore_dynamicsuse
use: MockedFunction<(object: CGameObject) => boolean>;Use another object through the engine interaction path.
Param
object
Object being used.
Returns
Whether the use action was handled.
Implementation of
CPhysicObject.useInherited from
MockCGameObject.useVisual
Visual: MockedFunction<() => IXR_IRender_Visual>;Returns
Render visual assigned to the object.
Implementation of
CPhysicObject.VisualInherited from
MockCGameObject.Visual