Class MyComponentContainer
  
  
  
  
    Inheritance
    System.Object
    MyComponentContainer
      
   
  
  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
  
  
  
  
  Add<T>(T)
  
  
  Declaration
  
    public void Add<T>(T component)
    where T : MyComponentBase
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | T | component |  | 
    
  
  Type Parameters
  
  
  
  
  Clear()
  
  
  Declaration
  
  
  
  
  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
  
  
  
  
  Get<T>()
  
  
  Declaration
  
    public T Get<T>()
    where T : MyComponentBase
   
  Returns
  
  Type Parameters
  
  
  
  
  GetComponentTypes()
  
  
  Declaration
  
    public Dictionary<Type, List<MyComponentBase>>.KeyCollection GetComponentTypes()
   
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Collections.Generic.Dictionary.KeyCollection<> |  | 
    
  
  
  
  
  GetEnumerator()
  
  
  Declaration
  
    public IEnumerator<MyComponentBase> GetEnumerator()
   
  Returns
  
  
  
  
  Has<T>()
  
  
  Declaration
  
    public bool Has<T>()
    where T : MyComponentBase
   
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  Type Parameters
  
  
  
  
  Init(MyContainerDefinition)
  
  
  Declaration
  
    public virtual void Init(MyContainerDefinition definition)
   
  Parameters
  
  
  
  
  OnAddedToScene()
  
  
  Declaration
  
    public void OnAddedToScene()
   
  
  
  
  OnComponentAdded(Type, MyComponentBase)
  
  
  Declaration
  
    protected virtual void OnComponentAdded(Type t, MyComponentBase component)
   
  Parameters
  
  
  
  
  OnComponentRemoved(Type, MyComponentBase)
  
  
  Declaration
  
    protected virtual void OnComponentRemoved(Type t, MyComponentBase component)
   
  Parameters
  
  
  
  
  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
  
  
  
  
  Remove<T>()
  
  
  Declaration
  
    public void Remove<T>()
    where T : MyComponentBase
   
  Type Parameters
  
  
  
  
  Remove<T>(T)
  
  
  Declaration
  
    public void Remove<T>(T component)
    where T : MyComponentBase
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | T | component |  | 
    
  
  Type Parameters
  
  
  
  
  Serialize(Boolean)
  
  
  Declaration
  
    public MyObjectBuilder_ComponentContainer Serialize(bool copy = false)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Boolean | copy |  | 
    
  
  Returns
  
  
  
  
  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
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
  
  
  TryGet(Type, MyStringHash, out MyComponentBase)
  
  
  Declaration
  
    public bool TryGet(Type type, MyStringHash subtype, out MyComponentBase component)
   
  Parameters
  
  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
  
  
  
  
  TryGetComponentIndex(MyComponentBase, out Int32)
  
  
  Declaration
  
    public bool TryGetComponentIndex(MyComponentBase component, out int index)
   
  Parameters
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  |