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

Manages all Komodo.Core.ECS.Components.PhysicsComponent objects. More...

Inheritance diagram for Komodo.Core.ECS.Systems.PhysicsSystem:
Komodo.Core.ECS.Systems.ISystem< PhysicsComponent >

Public Member Functions

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

 
bool AddEntity ([NotNull] Entity entityToAdd)
 Adds a Komodo.Core.ECS.Entities.Entity to the PhysicsSystem if the Komodo.Core.ECS.Entities.Entity is not already present. More...
 
void ClearEntities ()
 Removes all Komodo.Core.ECS.Entities.Entity objects from the PhysicsSystem. More...
 
void Initialize ()
 Initializes the PhysicsSystem and all tracked Komodo.Core.ECS.Components.PhysicsComponent 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 PhysicsSystem, including all the Komodo.Core.ECS.Entities.Entity's Komodo.Core.ECS.Components.PhysicsComponent objects. More...
 
bool RemoveEntity (Entity entityToRemove)
 Removes a Komodo.Core.ECS.Entities.Entity from the PhysicsSystem, including all the Komodo.Core.ECS.Entities.Entity's Komodo.Core.ECS.Components.PhysicsComponent objects. More...
 
- Public Member Functions inherited from Komodo.Core.ECS.Systems.ISystem< PhysicsComponent >
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< PhysicsComponentComponents [get]
 All tracked Komodo.Core.ECS.Components.PhysicsComponent 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 PhysicsSystem has called Initialize(). More...
 
- Properties inherited from Komodo.Core.ECS.Systems.ISystem< PhysicsComponent >
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

Member Function Documentation

◆ AddEntity()

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

Adds a Komodo.Core.ECS.Entities.Entity to the PhysicsSystem 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 PhysicsSystem's Entites. Returns false if the Komodo.Core.ECS.Entities.Entity already existed.

◆ ClearEntities()

void Komodo.Core.ECS.Systems.PhysicsSystem.ClearEntities ( )

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

◆ Initialize()

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

Initializes the PhysicsSystem and all tracked Komodo.Core.ECS.Components.PhysicsComponent objects.

◆ PostUpdate()

void Komodo.Core.ECS.Systems.PhysicsSystem.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.PhysicsComponent objects.

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

◆ PreUpdate()

void Komodo.Core.ECS.Systems.PhysicsSystem.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.PhysicsComponent objects.

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

◆ RemoveEntity() [1/2]

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

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

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

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

Property Documentation

◆ Components

List<PhysicsComponent> Komodo.Core.ECS.Systems.PhysicsSystem.Components
get

◆ Entities

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

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

◆ Game

Game Komodo.Core.ECS.Systems.PhysicsSystem.Game
get

Reference to current Komodo.Core.Game instance.

◆ IsInitialized

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

Whether or not the PhysicsSystem has called Initialize().