75 void setSprite(
const std::shared_ptr<GUI::ECS::Components::SpriteComponent> &sprite,
const std::shared_ptr<GUI::ECS::Components::SpriteComponent> &bullet);
82 void setPosition(
const std::pair<float, float> &pos);
211 const std::string
getInfo(
const unsigned int indent = 0)
const;
222 const int _randInt(
int min = 5,
int max = 20);
224 bool _visible =
true;
225 long int _health = 3;
226 unsigned int _delayBeforeShot = 20;
This is the file that links the EntityNode children.
Macro definitions for logging messages with varying levels of detail and formatting.
This is the file in charge of containing the Log class (the one in charge of outputing info only when...
File in charge of containing the logic for the bullet class.
Declaration of the PlayerBrain class and related functionality.
This is an agglomerator in which all the files from Recoded folder will be included.
This is the file that contains the class in charge of managing a sprite.
Represents a drawable and interactive sprite in the ECS system.
Represents a bullet entity in the game.
The EnemyBrain class represents the logic and behavior of an enemy entity.
const GUI::ECS::Components::SpriteComponent render()
Renders the enemy's sprite.
void setSprite(const std::shared_ptr< GUI::ECS::Components::SpriteComponent > &sprite, const std::shared_ptr< GUI::ECS::Components::SpriteComponent > &bullet)
Sets the sprite components for the enemy and its bullet.
const std::string getInfo(const unsigned int indent=0) const
This is a function meant for debugging purposes It will dump the current state of the variables upon ...
void setVisible(const bool visible)
Sets the visibility of the enemy.
const bool isVisible() const
Checks if the enemy is visible.
const bool isColliding(const GUI::ECS::Systems::Collision &second) const
Checks if the enemy is colliding with another entity.
void setPosition(const std::pair< float, float > &pos)
Sets the position of the enemy.
EnemyBrain & operator=(const GUI::ECS::Online::EnemyBrain ©)
Overloads the assignment operator to copy from another EnemyBrain.
EnemyBrain(const std::uint32_t entityId=0)
Default constructor.
void setDimension(const std::pair< float, float > &size)
Sets the dimensions of the enemy.
const long int getHealth() const
Gets the health of the enemy.
const GUI::ECS::Online::Bullet shoot(const std::uint32_t id)
Make the enemy shoot a projectile with a defined id.
const bool getVisible() const
Gets the visibility status of the enemy.
const GUI::ECS::Components::SpriteComponent getSprite() const
Gets the sprite data for the enemy.
void setBulletSize(const std::pair< float, float > &size)
Sets the size of the bullet.
~EnemyBrain()=default
Destructor.
const GUI::ECS::Systems::Collision getCollision() const
Gets the collision data for the enemy.
void update(const GUI::ECS::Online::EnemyBrain ©)
Updates the sprite by copying another EnemyBrain.
void tick()
Updates the enemy's state and determines if it should fire a bullet.
const GUI::ECS::Online::Bullet getBullet() const
Gets the bullet data for the enemy.
void setHealth(const long int health)
Sets the health of the enemy.
Represents a rectangular component that can detect collisions and mouse interactions,...
std::ostream & operator<<(std::ostream &os, const Bullet &item)
Outputs the sprite's info to a stream.