Show / Hide Table of Contents

Class MyCharacterStatComponent

Inheritance
System.Object
MyComponentBase
MyEntityComponentBase
MyEntityStatComponent
MyCharacterStatComponent
Inherited Members
MyEntityStatComponent.m_scripts
MyEntityStatComponent.Serialize(Boolean)
MyEntityStatComponent.Deserialize(MyObjectBuilder_ComponentBase)
MyEntityStatComponent.IsSerialized()
MyEntityStatComponent.HasAnyComsumableEffect()
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
MyEntityComponentBase.Container
MyEntityComponentBase.Entity
MyEntityComponentBase.AttachSyncToEntity
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
[MyComponentBuilder]
public class MyCharacterStatComponent : MyEntityStatComponent, IMyEntityComponentBase, IMyComponentBase

Constructors

MyCharacterStatComponent()

Declaration
public MyCharacterStatComponent()

Fields

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

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

Health

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

HealthRatio

Declaration
public float HealthRatio { 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

DoDamage(Single, Object)

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

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

Update()

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

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
☀
☾