IEntitySystemSink

IEntitySystemSinkabstract

#include

Public Member Functions

virtual bool OnBeforeSpawn (SEntitySpawnParams &params)=0
virtual void OnSpawn (IEntity *pEntity, SEntitySpawnParams &params)=0
virtual bool OnRemove (IEntity *pEntity)=0
virtual void OnReused (IEntity *pEntity, SEntitySpawnParams &params)=0
virtual void GetMemoryUsage (class ICrySizer *pSizer) const

Detailed Description

Callback interface for a class that wants to be aware when new entities are being spawned or removed. A class that implements this interface will be called every time a new entity is spawned, removed, or when an entity container is to be spawned.

Member Function Documentation

◆ GetMemoryUsage()

virtual void IEntitySystemSink::GetMemoryUsage ( class ICrySizer * pSizer) const
inline
virtual

Collect memory informations

Parameters
pSizerSizer class used to collect the memory informations.

◆ OnBeforeSpawn()

virtual bool IEntitySystemSink::OnBeforeSpawn ( SEntitySpawnParams & params)
pure virtual

This callback is called before this entity is spawned. The entity will be created and added to the list of entities, if this function returns true. Returning false will abort the spawning process.

Parameters
paramsParameters that will be used to spawn the entity.

◆ OnRemove()

virtual bool IEntitySystemSink::OnRemove ( IEntity * pEntity)
pure virtual

Called when an entity is being removed.

Parameters
pEntityEntity that is being removed. This entity is still fully valid.
Returns
true to allow removal, false to deny.

◆ OnReused()

virtual void IEntitySystemSink::OnReused ( IEntity * pEntity,
SEntitySpawnParams & params
)
pure virtual

Called when an entity has been reused. You should clean up when this is called.

Parameters
pEntityEntity that is being reused. This entity is still fully valid and with its new EntityId.
paramsThe new params this entity is using.

◆ OnSpawn()

virtual void IEntitySystemSink::OnSpawn ( IEntity * pEntity,
SEntitySpawnParams & params
)
pure virtual

This callback is called when this entity has finished spawning. The entity has been created and added to the list of entities, but has not been initialized yet.

Parameters
pEntityEntity that was just spawned.
params