Nez.Portable/ECS/Entity.cs
/// <summary>
/// Adds a Component to the components list. Returns the Component.
/// </summary>
/// <returns>Scene.</returns>
/// <param name="component">Component.</param>
/// <typeparam name="T">The 1st type parameter.</typeparam>
Adds a Component to the components list. Returns the Component.
Adds a Component to the components list . Returns the Component .
public T addComponent<T>(T component)
            where T : Component
        {
            component.entity = this;
            components.add(component);
            component.initialize();
            return component;
        }
public T addComponent < T > ( T component ) where T : Component { component . entity = this ; components . add ( component ) ; component . initialize ( ) ; return component ; }
Adds a Component to the components list.
Adds a Component to the components list .
None
component
T
None
typeparam
The 1st type parameter.
The 1st type parameter .