Show / Hide Table of Contents

Class MyCharacterStatComponent

Inheritance
System.Object
MyComponentBase
MyEntityComponentBase
MyEventProxyEntityComponent
MyUpdatingEntityComponent
MyEntityStatComponent
MyCharacterStatComponent
Implements
IMyHazardReceiver
Inherited Members
MyEntityStatComponent.m_scripts
MyEntityStatComponent.Serialize(Boolean)
MyEntityStatComponent.IsSerialized()
MyEntityStatComponent.HasAnyComsumableEffect(IEnumerable<MyEntityStatRegenEffect>)
MyEntityStatComponent.Init(MyComponentDefinitionBase)
MyEntityStatComponent.TryGetStat(MyStringHash, MyEntityStat)
MyEntityStatComponent.CanDoAction(String, MyTuple<UInt16, MyStringHash>, Boolean)
MyEntityStatComponent.DoAction(String)
MyEntityStatComponent.ApplyModifier(String)
MyEntityStatComponent.GetEfficiencyModifier(String)
MyEntityStatComponent.Stats
MyEntityStatComponent.ComponentTypeDebugString
MyUpdatingEntityComponent.UpdateOnceBeforeFrame()
MyUpdatingEntityComponent.UpdateBeforeSimulation()
MyUpdatingEntityComponent.UpdateBeforeSimulation100()
MyUpdatingEntityComponent.UpdateBeforeSimulationParallel()
MyUpdatingEntityComponent.UpdateSimulate()
MyUpdatingEntityComponent.UpdateAfterSimulation()
MyUpdatingEntityComponent.UpdateAfterSimulation10()
MyUpdatingEntityComponent.UpdateAfterSimulation100()
MyUpdatingEntityComponent.ParentEntity
MyUpdatingEntityComponent.NeedsUpdate
MyUpdatingEntityComponent.NeedsUpdateBeforeSimulation
MyUpdatingEntityComponent.NeedsUpdateBeforeSimulation100
MyUpdatingEntityComponent.NeedsUpdateSimulation
MyUpdatingEntityComponent.NeedsUpdateAfterSimulation
MyUpdatingEntityComponent.NeedsUpdateAfterSimulation10
MyUpdatingEntityComponent.NeedsUpdateAfterSimulation100
MyUpdatingEntityComponent.UpdateParallel
MyUpdatingEntityComponent.UpdatingType
MyUpdatingEntityComponent.NeedsUpdateChanged
MyUpdatingEntityComponent.UpdateParallelChanged
MyEventProxyEntityComponent.SyncType
MyEventProxyEntityComponent.AttachSyncToEntity
MyEntityComponentBase.Container
MyEntityComponentBase.Entity
MyEntityComponentBase.OnAfterAddedToContainer
MyEntityComponentBase.BeforeRemovedFromContainer
MyComponentBase.SetContainer(IMyComponentContainer)
MyComponentBase.GetAs<T>()
MyComponentBase.OnAddedToScene()
MyComponentBase.OnRemovedFromScene()
MyComponentBase.RemoveExistingComponentOnNewInsert
MyComponentBase.ContainerBase
Namespace: Sandbox.Game.Components
Assembly: Sandbox.Game.dll
Syntax
[MyComponentType]
[MyComponentBuilder]
public class MyCharacterStatComponent : MyEntityStatComponent, IMyEntityComponentBase, IMyComponentBase, IMyEventProxy, IMyEventOwner, IMyUpdatingEntityComponent, IMyHazardReceiver

Constructors

MyCharacterStatComponent()

Declaration
public MyCharacterStatComponent()

Fields

FOOD_ID

Declaration
public static MyStringHash FOOD_ID
Field Value
Type Description
MyStringHash

HEALTH_RATIO_CRITICAL

Declaration
public static readonly float HEALTH_RATIO_CRITICAL
Field Value
Type Description
System.Single

HEALTH_RATIO_LOW

Declaration
public static readonly float HEALTH_RATIO_LOW
Field Value
Type Description
System.Single

HealthId

Declaration
public static MyStringHash HealthId
Field Value
Type Description
MyStringHash

LastDamage

Declaration
public MyDamageInformation LastDamage
Field Value
Type Description
MyDamageInformation

LastDamageSoundOverride

Declaration
public MySoundPair LastDamageSoundOverride
Field Value
Type Description
MySoundPair

RADIATION_ID

Declaration
public static MyStringHash RADIATION_ID
Field Value
Type Description
MyStringHash

RADIATION_IMMUNITY_ID

Declaration
public static MyStringHash RADIATION_IMMUNITY_ID
Field Value
Type Description
MyStringHash

SHOW_CAUSE_OF_DEATH_FADE_START_FRAMES

Declaration
public static readonly ulong SHOW_CAUSE_OF_DEATH_FADE_START_FRAMES
Field Value
Type Description
System.UInt64

SHOW_CAUSE_OF_DEATH_FRAMES

Declaration
public static readonly ulong SHOW_CAUSE_OF_DEATH_FRAMES
Field Value
Type Description
System.UInt64

Properties

Food

Declaration
public MyEntityStat Food { get; }
Property Value
Type Description
MyEntityStat

FoodRatio

Declaration
public float FoodRatio { get; }
Property Value
Type Description
System.Single

Health

Declaration
public MyEntityStat Health { get; }
Property Value
Type Description
MyEntityStat

HealthRatio

Declaration
public float HealthRatio { get; }
Property Value
Type Description
System.Single

Radiation

Declaration
public MyEntityStat Radiation { get; }
Property Value
Type Description
MyEntityStat

RadiationImmunity

Declaration
public MyEntityStat RadiationImmunity { get; }
Property Value
Type Description
MyEntityStat

RadiationImmunityRatio

Declaration
public float RadiationImmunityRatio { get; }
Property Value
Type Description
System.Single

RadiationRatio

Declaration
public float RadiationRatio { get; }
Property Value
Type Description
System.Single

Methods

Consume(MyFixedPoint, MyConsumableItemDefinition)

Declaration
public void Consume(MyFixedPoint amount, MyConsumableItemDefinition definition)
Parameters
Type Name Description
VRage.MyFixedPoint amount
MyConsumableItemDefinition definition

Deserialize(MyObjectBuilder_ComponentBase)

Declaration
public override void Deserialize(MyObjectBuilder_ComponentBase objectBuilder)
Parameters
Type Name Description
MyObjectBuilder_ComponentBase objectBuilder
Overrides
MyEntityStatComponent.Deserialize(MyObjectBuilder_ComponentBase)

DoDamage(Single, Object)

Declaration
public void DoDamage(float damage, object statChangeData = null)
Parameters
Type Name Description
System.Single damage
System.Object statChangeData

GetAccumulatedDelta()

Gets accumulated incoming value change (before clamping and immunities) and resets it

Declaration
public float GetAccumulatedDelta()
Returns
Type Description
System.Single

OnAddedToContainer()

Declaration
public override void OnAddedToContainer()
Overrides
MyEntityStatComponent.OnAddedToContainer()

OnBeforeRemovedFromContainer()

Declaration
public override void OnBeforeRemovedFromContainer()
Overrides
MyEntityStatComponent.OnBeforeRemovedFromContainer()

OnHealthChanged(Single, Single, Object)

Declaration
public void OnHealthChanged(float newHealth, float oldHealth, object statChangeData)
Parameters
Type Name Description
System.Single newHealth
System.Single oldHealth
System.Object statChangeData

SendStatChangeNotification(String, String, Single)

Declaration
public void SendStatChangeNotification(string text, string font, float durationSeconds)
Parameters
Type Name Description
System.String text
System.String font
System.Single durationSeconds

TryGetScript<T>(out T)

Declaration
public bool TryGetScript<T>(out T script)
Parameters
Type Name Description
T script
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T

UpdateAfterSimulationParallel()

Declaration
public override void UpdateAfterSimulationParallel()
Overrides
MyEntityStatComponent.UpdateAfterSimulationParallel()

Explicit Interface Implementations

IMyHazardReceiver.Apply(Single, MyStringHash, MyStringHash)

Declaration
void IMyHazardReceiver.Apply(float amount, MyStringHash statId, MyStringHash damageType)
Parameters
Type Name Description
System.Single amount
MyStringHash statId
MyStringHash damageType

IMyHazardReceiver.CanBeAffected()

Declaration
bool IMyHazardReceiver.CanBeAffected()
Returns
Type Description
System.Boolean

IMyHazardReceiver.GetEntity()

Declaration
IMyEntity IMyHazardReceiver.GetEntity()
Returns
Type Description
IMyEntity

IMyHazardReceiver.GetPosition()

Declaration
Vector3D IMyHazardReceiver.GetPosition()
Returns
Type Description
Vector3D

Implements

IMyHazardReceiver

Extension Methods

MyEntityContainerEventExtensions.RegisterForEntityEvent(MyEntityComponentBase, MyStringHash, MyEntityContainerEventExtensions.EntityEventHandler)
MyEntityContainerEventExtensions.RegisterForEntityEvent(MyEntityComponentBase, MyEntity, MyStringHash, MyEntityContainerEventExtensions.EntityEventHandler)
MyEntityContainerEventExtensions.UnregisterForEntityEvent(MyEntityComponentBase, MyEntity, MyStringHash)
MyEntityContainerEventExtensions.RaiseEntityEvent(MyEntityComponentBase, MyStringHash, MyEntityContainerEventExtensions.EntityEventParams)
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾