Space Engineers
Public Member Functions | Public Attributes | Properties | List of all members
Sandbox.Game.Components.MyTimerComponent Class Reference
Inheritance diagram for Sandbox.Game.Components.MyTimerComponent:
VRage.Game.Components.MyEntityComponentBase VRage.Game.Components.MyComponentBase

Public Member Functions

void SetRemoveEntityTimer (float timeMin)
 
void SetTimer (float timeMin, Action< MyEntityComponentContainer > triggerEvent, bool start=true, bool repeat=false)
 
void ClearEvent ()
 
void Update ()
 
override void OnAddedToContainer ()
 Gets called after the container of this component changes More...
 
override void OnBeforeRemovedFromContainer ()
 Gets called before the removal of this component from a container More...
 
override MyObjectBuilder_ComponentBase Serialize (bool copy=false)
 
override void Deserialize (MyObjectBuilder_ComponentBase baseBuilder)
 
override bool IsSerialized ()
 Tells the component container serializer whether this component should be saved More...
 
override void Init (MyComponentDefinitionBase definition)
 
- Public Member Functions inherited from VRage.Game.Components.MyEntityComponentBase
override void OnAddedToContainer ()
 Gets called after the container of this component changes More...
 
override void OnBeforeRemovedFromContainer ()
 Gets called before the removal of this component from a container More...
 
- Public Member Functions inherited from VRage.Game.Components.MyComponentBase
virtual void SetContainer (MyComponentContainer container)
 Sets the container of this component. Note that the component is not added to the container here! Therefore, use MyComponentContainer.Add(...) method and it will in turn call this method. Actually, you should seldom have the need to call this method yourself. More...
 
virtual T GetAs< T > ()
 
virtual void OnAddedToScene ()
 CH: TOOD: Be careful! This does not get called if the component is added to a container that is in the scene already! More...
 
virtual void OnRemovedFromScene ()
 CH: TOOD: Be careful! This does not get called if the component is removed from a container that is still in the scene! More...
 

Public Attributes

bool Repeat = false
 
float TimeToEvent
 
Action< MyEntityComponentContainerEventToTrigger
 
bool TimerEnabled = true
 
bool RemoveEntityOnTimer = false
 

Properties

override string ComponentTypeDebugString [get]
 
- Properties inherited from VRage.Game.Components.MyEntityComponentBase
MyEntityComponentContainer Container [get]
 
IMyEntity Entity [get]
 
abstract string ComponentTypeDebugString [get]
 Name of the base component type for debug purposes (e.g.: "Position") More...
 
- Properties inherited from VRage.Game.Components.MyComponentBase
MyComponentContainer ContainerBase [get]
 This cannot be named Container to not conflict with the definition of Container in MyEntityComponentBase. More...
 

Additional Inherited Members

- Events inherited from VRage.Game.Components.MyEntityComponentBase
static Action< MyEntityComponentBaseOnAfterAddedToContainer
 
Action< MyEntityComponentBaseBeforeRemovedFromContainer
 

Detailed Description

Definition at line 20 of file MyTimerComponent.cs.

Member Function Documentation

void Sandbox.Game.Components.MyTimerComponent.ClearEvent ( )
inline

Definition at line 56 of file MyTimerComponent.cs.

override void Sandbox.Game.Components.MyTimerComponent.Deserialize ( MyObjectBuilder_ComponentBase  baseBuilder)
inlinevirtual

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 132 of file MyTimerComponent.cs.

override void Sandbox.Game.Components.MyTimerComponent.Init ( MyComponentDefinitionBase  definition)
inlinevirtual

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 151 of file MyTimerComponent.cs.

override bool Sandbox.Game.Components.MyTimerComponent.IsSerialized ( )
inlinevirtual

Tells the component container serializer whether this component should be saved

Returns

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 146 of file MyTimerComponent.cs.

override void Sandbox.Game.Components.MyTimerComponent.OnAddedToContainer ( )
inlinevirtual

Gets called after the container of this component changes

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 101 of file MyTimerComponent.cs.

override void Sandbox.Game.Components.MyTimerComponent.OnBeforeRemovedFromContainer ( )
inlinevirtual

Gets called before the removal of this component from a container

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 114 of file MyTimerComponent.cs.

override MyObjectBuilder_ComponentBase Sandbox.Game.Components.MyTimerComponent.Serialize ( bool  copy = false)
inlinevirtual

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 121 of file MyTimerComponent.cs.

void Sandbox.Game.Components.MyTimerComponent.SetRemoveEntityTimer ( float  timeMin)
inline

Definition at line 36 of file MyTimerComponent.cs.

void Sandbox.Game.Components.MyTimerComponent.SetTimer ( float  timeMin,
Action< MyEntityComponentContainer triggerEvent,
bool  start = true,
bool  repeat = false 
)
inline

Definition at line 42 of file MyTimerComponent.cs.

void Sandbox.Game.Components.MyTimerComponent.Update ( )
inline

Definition at line 69 of file MyTimerComponent.cs.

Member Data Documentation

Action<MyEntityComponentContainer> Sandbox.Game.Components.MyTimerComponent.EventToTrigger

Definition at line 24 of file MyTimerComponent.cs.

bool Sandbox.Game.Components.MyTimerComponent.RemoveEntityOnTimer = false

Definition at line 28 of file MyTimerComponent.cs.

bool Sandbox.Game.Components.MyTimerComponent.Repeat = false

Definition at line 22 of file MyTimerComponent.cs.

bool Sandbox.Game.Components.MyTimerComponent.TimerEnabled = true

Definition at line 27 of file MyTimerComponent.cs.

float Sandbox.Game.Components.MyTimerComponent.TimeToEvent

Definition at line 23 of file MyTimerComponent.cs.

Property Documentation

override string Sandbox.Game.Components.MyTimerComponent.ComponentTypeDebugString
get

Definition at line 32 of file MyTimerComponent.cs.


The documentation for this class was generated from the following file: