Entity Manager

The EntityManager class manages the creation, deletion, and updating of entities.

FunctionsDescription
CompareEntitiesThis function compares the entity IDs with the list of already existing entities. If the ID exists, the entity should be updated; if it does not exist, a new entity should be created.
CreateEntityThis function creates the entities through the game engine based on the requested parameters.
setPlayerColorIt allows targeting the correct sprite color on an image (to apply setTextureRect() function) based on the requested entity.
setEnemyIt allows targeting the correct enemy sprite on an image (to apply setTextureRect() function) based on the requested entity.
manageBackgroundThe function that creates the background entity.
winGameThe function checks if the player has won by verifying if the boss’s health is 0 or not.
loseGameThe function checks if the player has lost by verifying if his health is 0 or not.