Empeld
Empeld plugin documentation.
pluginbase.Dependencies.IEntityManager Interface Reference

Entity manager for server-side entities only More...

Public Member Functions

Spawn< T > ()
 Spawn an entity of type T More...
 
void Spawn (IMutableEntity entity, IUser owner=null)
 Spawn the specified entity that has been pre-created More...
 
void Destroy (IEntity entity)
 Destroy the specified entity. More...
 
IPlayableEntity GetClientPrimaryEntity (ushort ident)
 Get the playable entity for a client Id More...
 
IPlayableEntity GetClientPrimaryEntity (IUser user)
 Get a playable entity, given a user More...
 
IUser GetClientOfPrimaryEntity (IPlayableEntity entity)
 Gets the user (if any) that is controlling the current entity More...
 
IEnumerable< T > GetEntitiesOfType< T > ()
 Get all entities of a certain type More...
 
IEnumerable< T > GetEntitiesNear< T > (Vector3d pos, double dist)
 Get all entities of a certain type near a coordinate More...
 

Properties

int ActiveEntityCount [get]
 Gets the entity count. More...
 
IEnumerable< IEntityEntities [get]
 Get an enumerable of all instantiated entities More...
 

Detailed Description

Entity manager for server-side entities only

Attribute: Injectable

Member Function Documentation

◆ Destroy()

void pluginbase.Dependencies.IEntityManager.Destroy ( IEntity  entity)

Destroy the specified entity.

Parameters
entityEntity.

◆ GetClientOfPrimaryEntity()

IUser pluginbase.Dependencies.IEntityManager.GetClientOfPrimaryEntity ( IPlayableEntity  entity)

Gets the user (if any) that is controlling the current entity

Returns
The user.
Parameters
entityEntity.

◆ GetClientPrimaryEntity() [1/2]

IPlayableEntity pluginbase.Dependencies.IEntityManager.GetClientPrimaryEntity ( ushort  ident)

Get the playable entity for a client Id

Returns
The client primary entity.
Parameters
identIdent.

◆ GetClientPrimaryEntity() [2/2]

IPlayableEntity pluginbase.Dependencies.IEntityManager.GetClientPrimaryEntity ( IUser  user)

Get a playable entity, given a user

Returns
The client primary entity.
Parameters
userUser.

◆ GetEntitiesNear< T >()

IEnumerable<T> pluginbase.Dependencies.IEntityManager.GetEntitiesNear< T > ( Vector3d  pos,
double  dist 
)

Get all entities of a certain type near a coordinate

Returns
The entities near.
Parameters
posPosition.
distDist.
Template Parameters
TThe type of the entities to look for
Type Constraints
T :IPositionableEntity 

◆ GetEntitiesOfType< T >()

IEnumerable<T> pluginbase.Dependencies.IEntityManager.GetEntitiesOfType< T > ( )

Get all entities of a certain type

Returns
The entities of type.
Template Parameters
TEntity type
Type Constraints
T :IEntity 

◆ Spawn()

void pluginbase.Dependencies.IEntityManager.Spawn ( IMutableEntity  entity,
IUser  owner = null 
)

Spawn the specified entity that has been pre-created

Parameters
entityEntity.
ownerOwner.

◆ Spawn< T >()

Spawn an entity of type T

Template Parameters
TThe 1st type parameter.
Type Constraints
T :class 
T :IMutableEntity 
T :new() 

Property Documentation

◆ ActiveEntityCount

int pluginbase.Dependencies.IEntityManager.ActiveEntityCount
get

Gets the entity count.

The entity count.

◆ Entities

IEnumerable<IEntity> pluginbase.Dependencies.IEntityManager.Entities
get

Get an enumerable of all instantiated entities

The entities.


The documentation for this interface was generated from the following file: