Interface IMyHazardReceiver
Describes a subject of hazard exposure
Namespace: Sandbox.ModAPI
Assembly: Sandbox.Common.dll
Syntax
public interface IMyHazardReceiver
Methods
Apply(Single, MyStringHash, MyStringHash)
Affects corresponding entity stat. Does not check admin protection. For Radiation, checks immunity stat. Positive value increases stat (except Health, which is reduced by positive damage value).
Declaration
void Apply(float amount, MyStringHash statId, MyStringHash damageType)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | amount | Momentary exposure amount |
| MyStringHash | statId | ID of the affected entity stat |
| MyStringHash | damageType | If the hazard affects Health stat, MyDamageType is used to differentiate kinds of damage |
CanBeAffected()
Is it sheltered from the exposure?
Declaration
bool CanBeAffected()
Returns
| Type | Description |
|---|---|
| System.Boolean |
GetEntity()
Gets the associated entity
Declaration
IMyEntity GetEntity()
Returns
| Type | Description |
|---|---|
| IMyEntity |
GetPosition()
Gets world position
Declaration
Vector3D GetPosition()
Returns
| Type | Description |
|---|---|
| Vector3D |