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);
207 const std::string
getInfo(
const unsigned int indent = 0)
const;
210 bool _visible =
true;
211 long int _health = 100;
File in charge of containing the logic for the bullet class.
Declaration of the EnemyBrain class and its 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.
Forward declaration of the Bullet class.
const long int getHealth() const
Gets the player's health value.
void setBulletSize(const std::pair< float, float > &size)
Sets the bullet dimensions.
void setPosition(const std::pair< float, float > &pos)
Sets the player's position.
PlayerBrain & operator=(const GUI::ECS::Demo::PlayerBrain ©)
Overloads the assignment operator to copy from another PlayerBrain.
void setVisible(const bool visible)
Sets the player's visibility state.
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 bool isColliding(const GUI::ECS::Systems::Collision &second) const
Checks if the player is colliding with another entity.
~PlayerBrain()=default
Destructor.
void setHealth(const long int health)
Sets the player's health.
void tick()
Updates the player's state for the current frame.
PlayerBrain(const std::uint32_t entityId=0)
Default constructor.
const GUI::ECS::Demo::Bullet shoot() const
Simulates the player shooting a bullet.
void setSprite(const std::shared_ptr< GUI::ECS::Components::SpriteComponent > &sprite, const std::shared_ptr< GUI::ECS::Components::SpriteComponent > &bullet)
Sets the sprite and bullet sprite components for the player.
const bool getVisible() const
Gets the player's visibility state.
const GUI::ECS::Components::SpriteComponent render()
Renders the player's sprite to the screen.
const bool isVisible() const
Checks if the player is currently visible.
const GUI::ECS::Systems::Collision getCollision() const
Gets the player's collision component.
void update(const GUI::ECS::Demo::PlayerBrain ©)
Updates the player's state by copying another PlayerBrain.
void setDimension(const std::pair< float, float > &size)
Sets the player's dimensions.
const GUI::ECS::Demo::Bullet getBullet() const
Gets the player's bullet instance.
const GUI::ECS::Components::SpriteComponent getSprite() const
Gets the player's sprite component.
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.