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);
133 const std::optional<GUI::ECS::Demo::Bullet>
tick();
202 const std::string
getInfo(
const unsigned int indent = 0)
const;
213 const int _randInt(
int min = 5,
int max = 20);
215 bool _visible =
true;
216 long int _health = 1;
217 unsigned int _delayBeforeShot = 20;
File in charge of containing the logic for the bullet class.
Declaration of the PlayerBrain class and related functionality.
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...
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 bool getVisible() const
Gets the visibility status of the enemy.
const std::optional< GUI::ECS::Demo::Bullet > tick()
Updates the enemy's state and determines if it should fire a bullet.
void update(const GUI::ECS::Demo::EnemyBrain ©)
Updates the sprite by copying another EnemyBrain.
void setVisible(const bool visible)
Sets the visibility of the enemy.
const GUI::ECS::Systems::Collision getCollision() const
Gets the collision data for the enemy.
void setPosition(const std::pair< float, float > &pos)
Sets the position of the enemy.
const bool isColliding(const GUI::ECS::Systems::Collision &second) const
Checks if the enemy is colliding with another entity.
const GUI::ECS::Demo::Bullet getBullet() const
Gets the bullet data for the enemy.
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 ...
const GUI::ECS::Components::SpriteComponent render()
Renders the enemy's sprite.
EnemyBrain & operator=(const GUI::ECS::Demo::EnemyBrain ©)
Overloads the assignment operator to copy from another EnemyBrain.
void setHealth(const long int health)
Sets the health of the enemy.
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 bool isVisible() const
Checks if the enemy is visible.
const long int getHealth() const
Gets the health of the enemy.
void setDimension(const std::pair< float, float > &size)
Sets the dimensions of the enemy.
const GUI::ECS::Components::SpriteComponent getSprite() const
Gets the sprite data for the enemy.
~EnemyBrain()=default
Destructor.
EnemyBrain(const std::uint32_t entityId=0)
Default constructor.
void setBulletSize(const std::pair< float, float > &size)
Sets the size of the bullet.
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.