Komodo Engine
C PROJECT_LOGO=
Komodo.Core.ECS.Systems.ISystem< T > Interface Template Reference

Defines the interface for all Komodo.Core.ECS.Systems classes. More...

Public Member Functions

bool AddEntity (Entity entityToAdd)
 Adds a Komodo.Core.ECS.Entities.Entity to the ISystem if the Komodo.Core.ECS.Entities.Entity is not already present. More...
 
void ClearEntities ()
 Removes all Komodo.Core.ECS.Entities.Entity objects from the ISystem. More...
 
void Initialize ()
 Should update the ISystem as well as all of it's T objects. More...
 
void PostUpdate (GameTime gameTime)
 Runs any operations needed at the end of the Komodo.Core.Game.Update(GameTime) loop. More...
 
void PreUpdate (GameTime gameTime)
 Runs any operations needed at the beginning of the Komodo.Core.Game.Update(GameTime) loop. More...
 
bool RemoveEntity (Guid entityID)
 Removes a Komodo.Core.ECS.Entities.Entity from the ISystem, including all the Komodo.Core.ECS.Entities.Entity's T objects. More...
 
bool RemoveEntity (Entity entityToRemove)
 Removes a Komodo.Core.ECS.Entities.Entity from the ISystem, including all the Komodo.Core.ECS.Entities.Entity's Komodo.Core.ECS.Components.Component objects. More...
 

Properties

List< T > Components [get]
 All tracked T objects. More...
 
Dictionary< Guid, EntityEntities [get, set]
 All tracked Komodo.Core.ECS.Entities.Entity objects. More...
 
Game Game [get]
 Reference to current Komodo.Core.Game instance. More...
 
bool IsInitialized [get]
 Whether or not the ISystem has called Initialize(). More...
 

Detailed Description

Defines the interface for all Komodo.Core.ECS.Systems classes.

Type Constraints
T :Component 

Member Function Documentation

◆ AddEntity()

bool Komodo.Core.ECS.Systems.ISystem< T >.AddEntity ( Entity  entityToAdd)

Adds a Komodo.Core.ECS.Entities.Entity to the ISystem if the Komodo.Core.ECS.Entities.Entity is not already present.

Parameters
entityToAddKomodo.Core.ECS.Entities.Entity to add.
Returns
Whether or not the Komodo.Core.ECS.Entities.Entity was added to this Drawable2DSystem's Entites. Returns false if the Komodo.Core.ECS.Entities.Entity already existed.

◆ ClearEntities()

void Komodo.Core.ECS.Systems.ISystem< T >.ClearEntities ( )

Removes all Komodo.Core.ECS.Entities.Entity objects from the ISystem.

◆ Initialize()

void Komodo.Core.ECS.Systems.ISystem< T >.Initialize ( )

Should update the ISystem as well as all of it's T objects.

◆ PostUpdate()

void Komodo.Core.ECS.Systems.ISystem< T >.PostUpdate ( GameTime  gameTime)

Runs any operations needed at the end of the Komodo.Core.Game.Update(GameTime) loop.

Parameters
gameTimeTime passed since last Komodo.Core.Game.Update(GameTime).

◆ PreUpdate()

void Komodo.Core.ECS.Systems.ISystem< T >.PreUpdate ( GameTime  gameTime)

Runs any operations needed at the beginning of the Komodo.Core.Game.Update(GameTime) loop.

Parameters
gameTimeTime passed since last Komodo.Core.Game.Update(GameTime).

◆ RemoveEntity() [1/2]

bool Komodo.Core.ECS.Systems.ISystem< T >.RemoveEntity ( Entity  entityToRemove)

Removes a Komodo.Core.ECS.Entities.Entity from the ISystem, including all the Komodo.Core.ECS.Entities.Entity's Komodo.Core.ECS.Components.Component objects.

Parameters
entityToRemoveKomodo.Core.ECS.Entities.Entity to remove.
Returns
Whether or not the Komodo.Core.ECS.Entities.Entity was removed from this ISystem's Entities. Will return false if the Komodo.Core.ECS.Entities.Entity is not present in Entities.

◆ RemoveEntity() [2/2]

bool Komodo.Core.ECS.Systems.ISystem< T >.RemoveEntity ( Guid  entityID)

Removes a Komodo.Core.ECS.Entities.Entity from the ISystem, including all the Komodo.Core.ECS.Entities.Entity's T objects.

Parameters
entityIDUnique identifier for the Komodo.Core.ECS.Entities.Entity.
Returns
Whether or not the Komodo.Core.ECS.Entities.Entity was removed from this ISystem's Entities. Will return false if the Komodo.Core.ECS.Entities.Entity is not present in Entities.

Property Documentation

◆ Components

List<T> Komodo.Core.ECS.Systems.ISystem< T >.Components
get

All tracked T objects.

◆ Entities

Dictionary<Guid, Entity> Komodo.Core.ECS.Systems.ISystem< T >.Entities
getset

All tracked Komodo.Core.ECS.Entities.Entity objects.

◆ Game

Reference to current Komodo.Core.Game instance.

◆ IsInitialized

bool Komodo.Core.ECS.Systems.ISystem< T >.IsInitialized
get

Whether or not the ISystem has called Initialize().