Show / Hide Table of Contents

Class MyTimerComponent

Inheritance
System.Object
MyComponentBase
MyEntityComponentBase
MyTimerComponent
Inherited Members
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
[MyComponentType]
[MyComponentBuilder]
public class MyTimerComponent : MyEntityComponentBase, IMyEntityComponentBase, IMyComponentBase

Constructors

MyTimerComponent()

Declaration
public MyTimerComponent()

Properties

ComponentTypeDebugString

Declaration
public override string ComponentTypeDebugString { get; }
Property Value
Type Description
System.String
Overrides
MyEntityComponentBase.ComponentTypeDebugString

EventToTrigger

Declaration
public Action<IMyEntityComponentContainer> EventToTrigger { get; set; }
Property Value
Type Description
System.Action<VRage.Game.Components.Interfaces.IMyEntityComponentContainer>

FramesFromLastTrigger

Declaration
public uint FramesFromLastTrigger { get; set; }
Property Value
Type Description
System.UInt32

IsSessionUpdateEnabled

Get or sets is session update enabled. Usefull if you don't want this timer to be updated by Timer Component System (session component).

Declaration
public bool IsSessionUpdateEnabled { get; set; }
Property Value
Type Description
System.Boolean

RemoveEntityOnTimer

Declaration
public bool RemoveEntityOnTimer { get; set; }
Property Value
Type Description
System.Boolean

Repeat

Declaration
public bool Repeat { get; set; }
Property Value
Type Description
System.Boolean

TimerEnabled

Declaration
public bool TimerEnabled { get; }
Property Value
Type Description
System.Boolean

TimerTick

Tick in minutes

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

TimerTickInFrames

Declaration
public uint TimerTickInFrames { get; }
Property Value
Type Description
System.UInt32

TimerType

Declaration
public MyTimerTypes TimerType { get; }
Property Value
Type Description
MyTimerTypes

TimeToEvent

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

Methods

ChangeTimerTick(UInt32)

Declaration
public void ChangeTimerTick(uint timeTickInFrames)
Parameters
Type Name Description
System.UInt32 timeTickInFrames

ClearEvent()

Declaration
public void ClearEvent()

Deserialize(MyObjectBuilder_ComponentBase)

Declaration
public override void Deserialize(MyObjectBuilder_ComponentBase baseBuilder)
Parameters
Type Name Description
MyObjectBuilder_ComponentBase baseBuilder
Overrides
MyComponentBase.Deserialize(MyObjectBuilder_ComponentBase)

Init(MyComponentDefinitionBase)

Declaration
public override void Init(MyComponentDefinitionBase definition)
Parameters
Type Name Description
MyComponentDefinitionBase definition
Overrides
MyComponentBase.Init(MyComponentDefinitionBase)

IsSerialized()

Declaration
public override bool IsSerialized()
Returns
Type Description
System.Boolean
Overrides
MyComponentBase.IsSerialized()

OnAddedToContainer()

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

OnBeforeRemovedFromContainer()

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

Pause()

Declaration
public void Pause()

Resume(Boolean)

Declaration
public void Resume(bool forceTrigger = false)
Parameters
Type Name Description
System.Boolean forceTrigger

Serialize(Boolean)

Declaration
public override MyObjectBuilder_ComponentBase Serialize(bool copy = false)
Parameters
Type Name Description
System.Boolean copy
Returns
Type Description
MyObjectBuilder_ComponentBase
Overrides
MyComponentBase.Serialize(Boolean)

SetRemoveEntityTimer(Single)

Declaration
public void SetRemoveEntityTimer(float timeMin)
Parameters
Type Name Description
System.Single timeMin

SetTimer(Single, Action<IMyEntityComponentContainer>, Boolean, Boolean)

Declaration
public void SetTimer(float timeMin, Action<IMyEntityComponentContainer> triggerEvent, bool start = true, bool repeat = false)
Parameters
Type Name Description
System.Single timeMin
System.Action<VRage.Game.Components.Interfaces.IMyEntityComponentContainer> triggerEvent
System.Boolean start
System.Boolean repeat

SetTimer(UInt32, Action<IMyEntityComponentContainer>, Boolean, Boolean)

Declaration
public void SetTimer(uint timeTickInFrames, Action<IMyEntityComponentContainer> triggerEvent, bool start = true, bool repeat = false)
Parameters
Type Name Description
System.UInt32 timeTickInFrames
System.Action<VRage.Game.Components.Interfaces.IMyEntityComponentContainer> triggerEvent
System.Boolean start
System.Boolean repeat

SetType(MyTimerTypes)

Declaration
public void SetType(MyTimerTypes type)
Parameters
Type Name Description
MyTimerTypes type

Update(Boolean)

Declaration
public void Update(bool forceUpdate = false)
Parameters
Type Name Description
System.Boolean forceUpdate

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