9 const float velocityX,
const float velocityY)
15 const float velocityX,
const float velocityY)
21 float y,
float velocityX,
float velocityY)
31 .with<ecs::Velocity>(
"projectile_velocity", velocityX, velocityY)
32 .with<
ecs::Rect>(
"projectile_rect", 0.F, 0.F,
51 .with<ecs::Velocity>(
"projectile_velocity", velocityX, velocityY)
52 .with<
ecs::Rect>(
"projectile_rect", 0.F, 0.F,
Configuration constants for the multiplayer game.
Utility functions for hitbox calculations.
Manages projectile creation and configuration.
EntityBuilder & with(Args &&...args)
Class for managing entities and their components.
EntityBuilder createEntity()
static ecs::Entity createSuperchargedProjectile(ecs::Registry ®istry, float x, float y, float velocityX, float velocityY)
Create a supercharged projectile.
static ecs::Entity createProjectile(ecs::Registry ®istry, ecs::Projectile::Type type, float x, float y, float velocityX, float velocityY)
Create a projectile with given parameters.
static ecs::Entity createBasicProjectile(ecs::Registry ®istry, float x, float y, float velocityX, float velocityY)
Create a basic projectile.
This file contains common definitions and constants.
constexpr float PROJECTILE_BASIC_RADIUS
constexpr float PROJECTILE_SUPERCHARGED_RADIUS
constexpr float SPRITE_WIDTH
constexpr float SPRITE_HEIGHT
constexpr float SPRITE_WIDTH
constexpr float SPRITE_HEIGHT
constexpr int ANIMATION_FRAMES
constexpr float ANIMATION_DURATION
constexpr auto TEXTURE_SHOOT
constexpr auto TEXTURE_SHOOT_CHARGED
std::pair< float, float > calculateHitboxOffsets(const float spriteWidth, const float spriteHeight, const float scale)
Calculate hitbox offsets to center the hitbox on the sprite.