Class MyTimerComponent
Inheritance
System.Object
MyTimerComponent
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
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
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
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
Deserialize(MyObjectBuilder_ComponentBase)
Declaration
public override void Deserialize(MyObjectBuilder_ComponentBase baseBuilder)
Parameters
Overrides
Init(MyComponentDefinitionBase)
Declaration
public override void Init(MyComponentDefinitionBase definition)
Parameters
Overrides
IsSerialized()
Declaration
public override bool IsSerialized()
Returns
Type |
Description |
System.Boolean |
|
Overrides
OnAddedToContainer()
Declaration
public override void OnAddedToContainer()
Overrides
OnBeforeRemovedFromContainer()
Declaration
public override void OnBeforeRemovedFromContainer()
Overrides
Pause()
Declaration
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
Overrides
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
Update(Boolean)
Declaration
public void Update(bool forceUpdate = false)
Parameters
Type |
Name |
Description |
System.Boolean |
forceUpdate |
|
Extension Methods