Class: MockHit
Mock of the X-Ray engine hit object for jest/node.
Implements
hit
Constructors
Constructor
new MockHit(source?: hit): MockHit;Parameters
| Parameter | Type |
|---|---|
source? | hit |
Returns
MockHit
Methods
create()
static create(source?: hit): MockHit;Parameters
| Parameter | Type |
|---|---|
source? | hit |
Returns
MockHit
mock()
static mock(source?: hit): hit;Parameters
| Parameter | Type |
|---|---|
source? | hit |
Returns
hit
Properties
bone
bone: Mock<(bone: string) => void>;Target a model bone by name.
Remarks
Stores the bone name on the hit. The receiving object resolves it against its own model.
Param
bone
Bone name used by the receiver model.
Implementation of
hit.boneboneName
boneName: string | null = null;direction
direction: vector;Hit direction.
Implementation of
hit.directiondraftsman
draftsman: game_object | null = null;Object that caused the hit.
Remarks
Leave null for world or scripted damage that should not be attributed to a game object.
Implementation of
hit.draftsmanimpulse
impulse: number = 100;Physics impulse applied with the hit.
Implementation of
hit.impulsepower
power: number = 100;Hit damage power.
Implementation of
hit.powertype
type: TXR_hit_type = MockHit.wound;Hit damage type.
Implementation of
hit.typeburn
readonly static burn: 0;Engine enum value for hit.burn.
chemical_burn
readonly static chemical_burn: 2;Engine enum value for hit.chemical_burn.
dummy
readonly static dummy: 12;Engine enum value for hit.dummy.
explosion
readonly static explosion: 7;Engine enum value for hit.explosion.
fire_wound
readonly static fire_wound: 8;Engine enum value for hit.fire_wound.
light_burn
readonly static light_burn: 11;Engine enum value for hit.light_burn.
physic_strike
readonly static physic_strike: 10;Engine enum value for hit.physic_strike.
radiation
readonly static radiation: 3;Engine enum value for hit.radiation.
shock
readonly static shock: 1;Engine enum value for hit.shock.
strike
readonly static strike: 5;Engine enum value for hit.strike.
telepatic
readonly static telepatic: 4;Engine enum value for hit.telepatic.
wound
readonly static wound: 6;Engine enum value for hit.wound.