 | EntityManagerExtensionsInitEntity Method |
Initializes the specified entity, adding components matching the
passed blueprint and initializing these with the data stored in
the blueprint and the specified configuration. Configuration
data is preferred over blueprint data.
Namespace: Slash.ECS.Blueprints.ExtensionsAssembly: Slash.ECS.Blueprints (in Slash.ECS.Blueprints.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static void InitEntity(
this EntityManager entityManager,
int entityId,
Blueprint blueprint,
IAttributeTable configuration = null,
IEnumerable<Type> additionalComponents = null
)
<ExtensionAttribute>
Public Shared Sub InitEntity (
entityManager As EntityManager,
entityId As Integer,
blueprint As Blueprint,
Optional configuration As IAttributeTable = Nothing,
Optional additionalComponents As IEnumerable(Of Type) = Nothing
)
public:
[ExtensionAttribute]
static void InitEntity(
EntityManager^ entityManager,
int entityId,
Blueprint^ blueprint,
IAttributeTable^ configuration = nullptr,
IEnumerable<Type^>^ additionalComponents = nullptr
)
[<ExtensionAttribute>]
static member InitEntity :
entityManager : EntityManager *
entityId : int *
blueprint : Blueprint *
?configuration : IAttributeTable *
?additionalComponents : IEnumerable<Type>
(* Defaults:
let _configuration = defaultArg configuration null
let _additionalComponents = defaultArg additionalComponents null
*)
-> unit
Parameters
- entityManager
- Type: Slash.ECS.ComponentsEntityManager
Entity Manager to add entity to. - entityId
- Type: SystemInt32
Id of the entity to initialize. - blueprint
- Type: Slash.ECS.BlueprintsBlueprint
Blueprint describing the entity to create. - configuration (Optional)
- Type: Slash.Collections.AttributeTablesIAttributeTable
Data for initializing the entity. - additionalComponents (Optional)
- Type: System.Collections.GenericIEnumerableType
Components to add to the entity, in addition to the ones specified by the blueprint.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
EntityManager. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also