IEntitySystemSink

C++
struct IEntitySystemSink {
};
File

IEntitySystem.h

Description

A 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.

IEntitySystemSink::~IEntitySystemSink Destructor
C++
virtual ~IEntitySystemSink();
IEntitySystemSink::GetMemoryUsage Method
C++
virtual void GetMemoryUsage(class ICrySizer * pSizer) const;
Parameters
Parameters
Description
class ICrySizer * pSizer
The Sizer class used to collect the memory informations
Description

Collect memory informations

IEntitySystemSink::OnBeforeSpawn Method
C++
virtual bool OnBeforeSpawn(SEntitySpawnParams & params) = 0;
Parameters
Parameters
Description
SEntitySpawnParams & params
The parameters that will be used to spawn the entity.
Description

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.

IEntitySystemSink::OnEvent Method
C++
virtual void OnEvent(IEntity * pEntity, SEntityEvent & event) = 0;
Parameters
Parameters
Description
IEntity * pEntity
The entity that is being removed. This entity is still fully valid. event -
Description

Called in response to an entity event.

IEntitySystemSink::OnRemove Method
C++
virtual bool OnRemove(IEntity * pEntity) = 0;
Parameters
Parameters
Description
IEntity * pEntity
The entity that is being removed. This entity is still fully valid.
Returns

True to allow removal, false to deny.

Description

Called when an entity is being removed.

IEntitySystemSink::OnReused Method
C++
virtual void OnReused(IEntity * pEntity, SEntitySpawnParams & params) = 0;
Parameters
Parameters
Description
IEntity * pEntity
The entity that is being reused. This entity is still fully valid and with its new EntityId.
SEntitySpawnParams & params
The new params this entity is using.
Description

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

IEntitySystemSink::OnSpawn Method
C++
virtual void OnSpawn(IEntity * pEntity, SEntitySpawnParams & params) = 0;
Parameters
Parameters
Description
IEntity * pEntity
The entity that was just spawned params -
Description

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.