Space Engineers
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
Sandbox.Game.Components.MyTriggerComponent Class Reference
Inheritance diagram for Sandbox.Game.Components.MyTriggerComponent:
VRage.Game.Components.MyEntityComponentBase VRage.Game.Components.MyComponentBase Sandbox.Game.Components.MyUpdateTriggerComponent Sandbox.Game.EntityComponents.MyAreaTriggerComponent

Public Types

enum  TriggerType { TriggerType.AABB, TriggerType.Sphere }
 

Public Member Functions

 MyTriggerComponent (TriggerType type, uint updateFrequency=300)
 
 MyTriggerComponent ()
 
override MyObjectBuilder_ComponentBase Serialize (bool copy=false)
 
override void Deserialize (MyObjectBuilder_ComponentBase builder)
 
override 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...
 
override void OnBeforeRemovedFromContainer ()
 Gets called before the removal of this component from a container More...
 
override void OnAddedToContainer ()
 Gets called after the container of this component changes More...
 
void Update ()
 
virtual void Dispose ()
 Override for custom trigger disposal before removing. More...
 
virtual void DebugDraw ()
 
override bool IsSerialized ()
 Tells the component container serializer whether this component should be saved More...
 
bool Contains (Vector3D point)
 
- 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 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...
 
virtual void Init (MyComponentDefinitionBase definition)
 

Public Attributes

Vector3D DefaultTranslation = Vector3D.Zero
 

Protected Member Functions

virtual void UpdateInternal ()
 Override this function to set custom update behaviour. Call base at first because it queries objects if DoQuery is set. More...
 
virtual bool QueryEvaluator (MyEntity entity)
 Override to discard query results of your choice. More...
 

Protected Attributes

TriggerType m_triggerType
 
BoundingBoxD m_AABB
 
BoundingSphereD m_boundingSphere
 

Properties

bool DoQuery [get, set]
 
List< MyEntityQueryResult [get]
 
uint UpdateFrequency [get, set]
 
virtual bool Enabled [get, protected set]
 
override string ComponentTypeDebugString [get]
 
Color CustomDebugColor [get, set]
 
Vector3D Center [get]
 Trigger BB center position. More...
 
- 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 15 of file MyTriggerComponent.cs.

Member Enumeration Documentation

Enumerator
AABB 
Sphere 

Definition at line 17 of file MyTriggerComponent.cs.

Constructor & Destructor Documentation

Sandbox.Game.Components.MyTriggerComponent.MyTriggerComponent ( TriggerType  type,
uint  updateFrequency = 300 
)
inline

Definition at line 62 of file MyTriggerComponent.cs.

Sandbox.Game.Components.MyTriggerComponent.MyTriggerComponent ( )
inline

Definition at line 71 of file MyTriggerComponent.cs.

Member Function Documentation

bool Sandbox.Game.Components.MyTriggerComponent.Contains ( Vector3D  point)
inline

Definition at line 257 of file MyTriggerComponent.cs.

virtual void Sandbox.Game.Components.MyTriggerComponent.DebugDraw ( )
inlinevirtual

Definition at line 219 of file MyTriggerComponent.cs.

override void Sandbox.Game.Components.MyTriggerComponent.Deserialize ( MyObjectBuilder_ComponentBase  builder)
inlinevirtual
virtual void Sandbox.Game.Components.MyTriggerComponent.Dispose ( )
inlinevirtual

Override for custom trigger disposal before removing.

Reimplemented in Sandbox.Game.Components.MyUpdateTriggerComponent.

Definition at line 214 of file MyTriggerComponent.cs.

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

Tells the component container serializer whether this component should be saved

Returns

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 252 of file MyTriggerComponent.cs.

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

Gets called after the container of this component changes

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 121 of file MyTriggerComponent.cs.

override void Sandbox.Game.Components.MyTriggerComponent.OnAddedToScene ( )
inlinevirtual

CH: TOOD: Be careful! This does not get called if the component is added to a container that is in the scene already!

Reimplemented from VRage.Game.Components.MyComponentBase.

Reimplemented in Sandbox.Game.Components.MyUpdateTriggerComponent.

Definition at line 108 of file MyTriggerComponent.cs.

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

Gets called before the removal of this component from a container

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 113 of file MyTriggerComponent.cs.

virtual bool Sandbox.Game.Components.MyTriggerComponent.QueryEvaluator ( MyEntity  entity)
inlineprotectedvirtual

Override to discard query results of your choice.

Parameters
entity
Returns
True for valid entities.

Reimplemented in Sandbox.Game.Components.MyUpdateTriggerComponent, and Sandbox.Game.EntityComponents.MyAreaTriggerComponent.

Definition at line 247 of file MyTriggerComponent.cs.

override MyObjectBuilder_ComponentBase Sandbox.Game.Components.MyTriggerComponent.Serialize ( bool  copy = false)
inlinevirtual
void Sandbox.Game.Components.MyTriggerComponent.Update ( )
inline

Definition at line 150 of file MyTriggerComponent.cs.

virtual void Sandbox.Game.Components.MyTriggerComponent.UpdateInternal ( )
inlineprotectedvirtual

Override this function to set custom update behaviour. Call base at first because it queries objects if DoQuery is set.

Reimplemented in Sandbox.Game.Components.MyUpdateTriggerComponent, and Sandbox.Game.EntityComponents.MyAreaTriggerComponent.

Definition at line 162 of file MyTriggerComponent.cs.

Member Data Documentation

Vector3D Sandbox.Game.Components.MyTriggerComponent.DefaultTranslation = Vector3D.Zero

Definition at line 31 of file MyTriggerComponent.cs.

BoundingBoxD Sandbox.Game.Components.MyTriggerComponent.m_AABB
protected

Definition at line 29 of file MyTriggerComponent.cs.

BoundingSphereD Sandbox.Game.Components.MyTriggerComponent.m_boundingSphere
protected

Definition at line 30 of file MyTriggerComponent.cs.

TriggerType Sandbox.Game.Components.MyTriggerComponent.m_triggerType
protected

Definition at line 28 of file MyTriggerComponent.cs.

Property Documentation

Vector3D Sandbox.Game.Components.MyTriggerComponent.Center
get

Trigger BB center position.

Definition at line 45 of file MyTriggerComponent.cs.

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

Definition at line 38 of file MyTriggerComponent.cs.

Color Sandbox.Game.Components.MyTriggerComponent.CustomDebugColor
getset

Definition at line 39 of file MyTriggerComponent.cs.

bool Sandbox.Game.Components.MyTriggerComponent.DoQuery
getsetprotected

Definition at line 33 of file MyTriggerComponent.cs.

virtual bool Sandbox.Game.Components.MyTriggerComponent.Enabled
getprotected set

Definition at line 37 of file MyTriggerComponent.cs.

List<MyEntity> Sandbox.Game.Components.MyTriggerComponent.QueryResult
getprotected

Definition at line 34 of file MyTriggerComponent.cs.

uint Sandbox.Game.Components.MyTriggerComponent.UpdateFrequency
getset

Definition at line 36 of file MyTriggerComponent.cs.


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