R-TYPE
Public Member Functions | Protected Member Functions | List of all members
ECS::CollisionSystem Class Reference

#include <CollisionSystem.hpp>

Inheritance diagram for ECS::CollisionSystem:
ECS::System

Public Member Functions

 CollisionSystem (const std::shared_ptr< ComponentManager > &componentsManager, const std::shared_ptr< EntityManager > &entityManager)
 
 ~CollisionSystem ()=default
 
void update ()
 
bool checkIsValidEntity (Entity entity)
 
- Public Member Functions inherited from ECS::System
 System (const std::shared_ptr< ComponentManager > &componentManager, const std::shared_ptr< EntityManager > &entityManager)
 
 ~System ()=default
 

Protected Member Functions

void bonusCollisionManagement (Entity entityPlayer, Entity entityBonus)
 

Additional Inherited Members

- Protected Attributes inherited from ECS::System
std::shared_ptr< ComponentManager_componentManager
 
std::shared_ptr< EntityManager_entityManager
 

Constructor & Destructor Documentation

◆ CollisionSystem()

ECS::CollisionSystem::CollisionSystem ( const std::shared_ptr< ComponentManager > &  componentsManager,
const std::shared_ptr< EntityManager > &  entityManager 
)

It's a constructor for the CollisionSystem class

Parameters
componentsManagerThe ComponentManager that will be used to get the components of the entities.
entityManagerThe entity manager that will be used to get the entities that have the components that the system will use.

◆ ~CollisionSystem()

ECS::CollisionSystem::~CollisionSystem ( )
default

Member Function Documentation

◆ bonusCollisionManagement()

void ECS::CollisionSystem::bonusCollisionManagement ( Entity  entityPlayer,
Entity  entityBonus 
)
protected

◆ checkIsValidEntity()

bool ECS::CollisionSystem::checkIsValidEntity ( Entity  entity)
virtual

If the entity has a position, hitbox, and health component, then it's valid

Parameters
entityThe entity to check
Returns
A boolean value.

Implements ECS::System.

◆ update()

void ECS::CollisionSystem::update ( )
virtual

If the entity is valid, check if it's colliding with another entity, and if it is, remove health from the entity

Implements ECS::System.


The documentation for this class was generated from the following files: