32 void setEnable(
const bool enable)
override { (void)enable; }
71 .with<
ecs::Rect>(
"enemy_rect", 0.0f, 0.0f,
92 const int waveSize = 5 + (std::rand() % 4);
94 for (
int i = 0; i < waveSize; ++i)
107 .with<
ecs::Rect>(
"enemy_wave_rect", 0.0f, 0.0f,
113 .with<ecs::Animation>(
"enemy_wave_animation", 0,
This file contains the component definitions.
Configuration constants for the multiplayer game.
Utility functions for hitbox calculations.
This file contains the IRenderer class declaration.
This file contains the interface for systems.
This file contains the Registry class declaration.
Abstract class for system.
EntityBuilder & with(Args &&...args)
Class for managing entities and their components.
EntityBuilder createEntity()
static void spawnWave(ecs::Registry ®istry)
SpawnSystem & operator=(const SpawnSystem &)=delete
void update(ecs::Registry ®istry, float dt) override
void setEnable(const bool enable) override
SpawnSystem(const std::shared_ptr< eng::IRenderer > &renderer)
static void spawnEnemy(ecs::Registry ®istry)
~SpawnSystem() override=default
SpawnSystem(SpawnSystem &&)=delete
SpawnSystem & operator=(SpawnSystem &&)=delete
const std::shared_ptr< eng::IRenderer > & m_renderer
SpawnSystem(const SpawnSystem &)=delete
This file contains common definitions and constants.
constexpr int FRAMES_PER_ROW
constexpr float SPRITE_WIDTH
constexpr float SPRITE_HEIGHT
constexpr float ANIMATION_DURATION
constexpr float SPAWN_RATE
constexpr int ANIMATION_FRAMES
constexpr float SHOOT_COOLDOWN
constexpr float ENEMY_RADIUS
constexpr auto TEXTURE_ENEMY_EASY
std::pair< float, float > calculateHitboxOffsetsRelative(const float x, const float y, const float spriteWidth, const float spriteHeight, const float scale)
Calculate hitbox offsets relative to sprite position.