SampSharp
SampSharp
SampSharp.Entities
EntityManager Class
EntityManager Methods
AddComponent Method
AddComponent(T) Method (EntityId)
AddComponent(T) Method (EntityId, Object[])
EntityManager
AddComponent
T
Method (EntityId,
Object
)
Adds a component of the specified type
T
to the specified
entity
with the specified constructor
args
.
Namespace:
SampSharp.Entities
Assembly:
SampSharp.Entities (in SampSharp.Entities.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax
C#
Copy
public
T
AddComponent
<T>(
EntityId
entity
,
params
Object
[]
args
)
where
T :
Component
Parameters
entity
Type:
SampSharp.Entities
EntityId
The entity to add the component to.
args
Type:
System
Object
The arguments of the constructor of the component.
Type Parameters
T
The type of the component to add.
Return Value
Type:
T
The created component.
Implements
IEntityManager
AddComponent
T
(EntityId,
Object
)
See Also
Reference
EntityManager Class
AddComponent Overload
SampSharp.Entities Namespace