38 Bullet(
const std::uint32_t EntityId = 0);
50 Bullet(
const GUI::ECS::Components::SpriteComponent &sprite,
const bool fromEnemy,
const std::pair<int, int> &positionInitial,
const unsigned int speed,
const std::pair<int, int> &direction = { 0, -1 },
const int damage = 10);
70 Bullet(
const std::uint32_t EntityId,
const GUI::ECS::Components::SpriteComponent &sprite,
const bool fromEnemy,
const std::pair<int, int> &positionInitial,
const unsigned int speed,
const std::pair<int, int> &direction = { 0, -1 },
const int damage = 10);
97 void setPosition(
const std::pair<float, float> &pos);
118 void setSpeed(
const unsigned int speed);
125 void setDirection(
const std::pair<int, int> &direction);
132 void setSize(
const std::pair<float, float> &dimension);
187 const unsigned int getSpeed()
const;
233 const std::string
getInfo(
const unsigned int indent = 0)
const;
243 void _createBullet(
const std::pair<int, int> &positionInitial);
249 std::pair<int, int> _direction;
250 std::pair<int, int> _positionInitial;
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.
void setDirection(const std::pair< int, int > &direction)
Sets the direction of the bullet.
const GUI::ECS::Components::SpriteComponent render()
Renders the bullet.
void setVisible(const bool visible)
Sets the visibility of the bullet.
const std::pair< int, int > getPositionInitial() const
Get the initial position that was set for the object.
const int getDamage() const
Get the Damage the bullet will inflict upon impact.
const GUI::ECS::Systems::Collision getCollision() const
Get the Collision component.
~Bullet()=default
Default destructor for the Bullet class.
void setSprite(const GUI::ECS::Components::SpriteComponent &sprite)
Sets the sprite representing the bullet.
const bool isEnemy() const
void setDamage(const int damage)
Sets the damage dealt by the bullet.
Bullet & operator=(const GUI::ECS::Online::Bullet ©)
Overloads the assignment operator to copy from another Bullet.
Bullet(const std::uint32_t EntityId=0)
Default constructor for the Bullet class.
void setEnemy(const bool enemy)
Marks the bullet as fired by an enemy or not.
void setPosition(const std::pair< float, float > &pos)
Sets the position of the 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 ...
const GUI::ECS::Components::SpriteComponent getSprite() const
Get the Sprite component.
void setSize(const std::pair< float, float > &dimension)
Sets the size of the bullet.
const bool isVisible() const
const unsigned int getSpeed() const
Get the Speed at which the bullet is traveling.
const bool isColliding(const GUI::ECS::Systems::Collision &second) const
const std::pair< float, float > getPosition() const
const std::pair< int, int > getDirection() const
Get the Direction in which the bullet is travelling.
void update(const GUI::ECS::Online::Bullet ©)
Updates the sprite by copying another Bullet.
void setSpeed(const unsigned int speed)
Sets the speed of the bullet.
void tick()
Advances the bullet's state by one tick.
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.