Komodo Engine
C PROJECT_LOGO=
Komodo.Core.ECS.Systems.Render2DSystem Class Reference

Manages all Komodo.Core.ECS.Components.Drawable2DComponent objects. There can be more than one Render2DSystem per Komodo.Core.Game. More...

Inheritance diagram for Komodo.Core.ECS.Systems.Render2DSystem:
Komodo.Core.ECS.Systems.ISystem< Drawable2DComponent >

Public Member Functions

 Render2DSystem (Game game)
 
Parameters
gameReference to current Komodo.Core.Game instance.

 
bool AddEntity ([NotNull] Entity entityToAdd)
 Adds a Komodo.Core.ECS.Entities.Entity to the Drawable2DSystem if the Komodo.Core.ECS.Entities.Entity is not already present. More...
 
void ClearEntities ()
 Removes all Komodo.Core.ECS.Entities.Entity objects from the Drawable2DSystem. More...
 
void Initialize ()
 Initializes the Drawable2DSystem and all tracked Komodo.Core.ECS.Components.Drawable2DComponent objects. More...
 
void PostUpdate (GameTime _)
 Runs any operations needed at the end of the Komodo.Core.Game.Update(GameTime) loop. More...
 
void PreUpdate (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 Drawable2DSystem, including all the Komodo.Core.ECS.Entities.Entity's Komodo.Core.ECS.Components.Drawable2DComponent objects. More...
 
bool RemoveEntity (Entity entityToRemove)
 Removes a Komodo.Core.ECS.Entities.Entity from the Drawable2DSystem, including all the Komodo.Core.ECS.Entities.Entity's Komodo.Core.ECS.Components.Drawable2DComponent objects. More...
 
- Public Member Functions inherited from Komodo.Core.ECS.Systems.ISystem< Drawable2DComponent >
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

CameraComponent ActiveCamera [get, set]
 Komodo.Core.ECS.Components.CameraComponent to be used for rendering all tracked Components. More...
 
List< Drawable2DComponentComponents [get]
 All tracked Komodo.Core.ECS.Components.Drawable2DComponent 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 Drawable2DSystem has called Initialize(). More...
 
SamplerState TextureFilter [get, set]
 Texture filtering to use for 2D sprites and fonts. More...
 
- Properties inherited from Komodo.Core.ECS.Systems.ISystem< Drawable2DComponent >
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

Manages all Komodo.Core.ECS.Components.Drawable2DComponent objects. There can be more than one Render2DSystem per Komodo.Core.Game.

Member Function Documentation

◆ AddEntity()

bool Komodo.Core.ECS.Systems.Render2DSystem.AddEntity ( [NotNull] Entity  entityToAdd)

Adds a Komodo.Core.ECS.Entities.Entity to the Drawable2DSystem 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.Render2DSystem.ClearEntities ( )

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

◆ Initialize()

void Komodo.Core.ECS.Systems.Render2DSystem.Initialize ( )

Initializes the Drawable2DSystem and all tracked Komodo.Core.ECS.Components.Drawable2DComponent objects.

◆ PostUpdate()

void Komodo.Core.ECS.Systems.Render2DSystem.PostUpdate ( GameTime  _)

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

Will initialize any new uninitialized Komodo.Core.ECS.Components.Drawable2DComponent objects.

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

◆ PreUpdate()

void Komodo.Core.ECS.Systems.Render2DSystem.PreUpdate ( GameTime  _)

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

Will initialize any new uninitialized Komodo.Core.ECS.Components.Drawable2DComponent objects.

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

◆ RemoveEntity() [1/2]

bool Komodo.Core.ECS.Systems.Render2DSystem.RemoveEntity ( Entity  entityToRemove)

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

Parameters
entityToRemoveKomodo.Core.ECS.Entities.Entity to remove.
Returns
Whether or not the Komodo.Core.ECS.Entities.Entity was removed from this Drawable2DSystem'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.Render2DSystem.RemoveEntity ( Guid  entityID)

Removes a Komodo.Core.ECS.Entities.Entity from the Drawable2DSystem, including all the Komodo.Core.ECS.Entities.Entity's Komodo.Core.ECS.Components.Drawable2DComponent 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 Drawable2DSystem's Entities. Will return false if the Komodo.Core.ECS.Entities.Entity is not present in Entities.

Property Documentation

◆ ActiveCamera

CameraComponent Komodo.Core.ECS.Systems.Render2DSystem.ActiveCamera
getset

Komodo.Core.ECS.Components.CameraComponent to be used for rendering all tracked Components.

◆ Components

List<Drawable2DComponent> Komodo.Core.ECS.Systems.Render2DSystem.Components
get

◆ Entities

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

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

◆ Game

Game Komodo.Core.ECS.Systems.Render2DSystem.Game
get

Reference to current Komodo.Core.Game instance.

◆ IsInitialized

bool Komodo.Core.ECS.Systems.Render2DSystem.IsInitialized
get

Whether or not the Drawable2DSystem has called Initialize().

◆ TextureFilter

SamplerState Komodo.Core.ECS.Systems.Render2DSystem.TextureFilter
getset

Texture filtering to use for 2D sprites and fonts.