Show / Hide Table of Contents

Class MyComponentContainer

Inheritance
System.Object
MyComponentContainer
MyEntityComponentContainer
Namespace: VRage.Game.Components
Assembly: VRage.Game.dll
Syntax
public class MyComponentContainer : Object, IMyComponentContainer

Constructors

MyComponentContainer()

Declaration
public MyComponentContainer()

Methods

Add(Type, MyComponentBase)

Declaration
public void Add(Type type, MyComponentBase component)
Parameters
Type Name Description
System.Type type
MyComponentBase component

Add<T>(T)

Declaration
public void Add<T>(T component)
    where T : MyComponentBase
Parameters
Type Name Description
T component
Type Parameters
Name Description
T

Clear()

Declaration
public void Clear()

Contains(Type)

Returns if any component is assignable from type

Declaration
public bool Contains(Type type)
Parameters
Type Name Description
System.Type type
Returns
Type Description
System.Boolean

Deserialize(MyObjectBuilder_ComponentContainer)

Declaration
public void Deserialize(MyObjectBuilder_ComponentContainer builder)
Parameters
Type Name Description
MyObjectBuilder_ComponentContainer builder

Get<T>()

Declaration
public T Get<T>()
    where T : MyComponentBase
Returns
Type Description
T
Type Parameters
Name Description
T

GetComponentTypes()

Declaration
public Dictionary<Type, List<MyComponentBase>>.KeyCollection GetComponentTypes()
Returns
Type Description
System.Collections.Generic.Dictionary.KeyCollection<>

GetEnumerator()

Declaration
public IEnumerator<MyComponentBase> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<MyComponentBase>

Has<T>()

Declaration
public bool Has<T>()
    where T : MyComponentBase
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T

Init(MyContainerDefinition)

Declaration
public virtual void Init(MyContainerDefinition definition)
Parameters
Type Name Description
MyContainerDefinition definition

OnAddedToScene()

Declaration
public void OnAddedToScene()

OnComponentAdded(Type, MyComponentBase)

Declaration
protected virtual void OnComponentAdded(Type t, MyComponentBase component)
Parameters
Type Name Description
System.Type t
MyComponentBase component

OnComponentRemoved(Type, MyComponentBase)

Declaration
protected virtual void OnComponentRemoved(Type t, MyComponentBase component)
Parameters
Type Name Description
System.Type t
MyComponentBase component

OnRemovedFromScene()

Declaration
public void OnRemovedFromScene()

Remove(Type)

Declaration
public void Remove(Type t)
Parameters
Type Name Description
System.Type t

Remove(Type, MyComponentBase)

Declaration
public void Remove(Type t, MyComponentBase component)
Parameters
Type Name Description
System.Type t
MyComponentBase component

Remove<T>()

Declaration
public void Remove<T>()
    where T : MyComponentBase
Type Parameters
Name Description
T

Remove<T>(T)

Declaration
public void Remove<T>(T component)
    where T : MyComponentBase
Parameters
Type Name Description
T component
Type Parameters
Name Description
T

Serialize(Boolean)

Declaration
public MyObjectBuilder_ComponentContainer Serialize(bool copy = false)
Parameters
Type Name Description
System.Boolean copy
Returns
Type Description
MyObjectBuilder_ComponentContainer

TryGet(Type, Int32, out MyComponentBase)

Declaration
public bool TryGet(Type type, int index, out MyComponentBase component)
Parameters
Type Name Description
System.Type type
System.Int32 index
MyComponentBase component
Returns
Type Description
System.Boolean

TryGet(Type, out MyComponentBase)

Declaration
public bool TryGet(Type type, out MyComponentBase component)
Parameters
Type Name Description
System.Type type
MyComponentBase component
Returns
Type Description
System.Boolean

TryGet(Type, MyStringHash, out MyComponentBase)

Declaration
public bool TryGet(Type type, MyStringHash subtype, out MyComponentBase component)
Parameters
Type Name Description
System.Type type
MyStringHash subtype
MyComponentBase component
Returns
Type Description
System.Boolean

TryGet<T>(out T)

Declaration
public bool TryGet<T>(out T component)
Parameters
Type Name Description
T component
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T

TryGetComponentIndex(MyComponentBase, out Int32)

Declaration
public bool TryGetComponentIndex(MyComponentBase component, out int index)
Parameters
Type Name Description
MyComponentBase component
System.Int32 index
Returns
Type Description
System.Boolean
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾