34 float posY = 0.0f,
float dirX = 0.0f,
float dirY = 0.0f,
35 float speed = 0.0f,
int damage = 0,
bool friendly =
true)
Base class for all game-related events.
Event triggered when a new projectile is created in the game.
bool isFriendly() const
Check if projectile is friendly.
float getDirX() const
Get the direction X component.
ProjectileCreatedEvent(uint32_t projectileId=0, uint32_t ownerId=0, float posX=0.0f, float posY=0.0f, float dirX=0.0f, float dirY=0.0f, float speed=0.0f, int damage=0, bool friendly=true)
Constructor.
float getPosY() const
Get the starting Y position.
float getPosX() const
Get the starting X position.
float getDirY() const
Get the direction Y component.
int getDamage() const
Get the projectile damage.
uint32_t getProjectileId() const
Get the projectile entity ID.
uint32_t getOwnerId() const
Get the owner entity ID.
~ProjectileCreatedEvent() override=default
float getSpeed() const
Get the projectile speed.