r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
ProjectileManager.hpp
Go to the documentation of this file.
1///
2/// @file ProjectileManager.hpp
3/// @brief Manages projectile creation and configuration
4/// @namespace cli
5///
6
7#pragma once
8
9#include "ECS/Component.hpp"
10#include "ECS/Registry.hpp"
11#include "GameConfig.hpp"
12
13namespace cli
14{
15 ///
16 /// @class ProjectileManager
17 /// @brief Handles projectile creation and management
18 /// @namespace cli
19 ///
21 {
22 public:
23 ProjectileManager() = default;
24 ~ProjectileManager() = default;
25
30
31 ///
32 /// @brief Create a basic projectile
33 /// @param registry The ECS registry
34 /// @param x X position
35 /// @param y Y position
36 /// @param velocityX X velocity
37 /// @param velocityY Y velocity
38 /// @return The created entity
39 ///
40 static ecs::Entity createBasicProjectile(ecs::Registry &registry, float x, float y, float velocityX,
41 float velocityY);
42
43 ///
44 /// @brief Create a supercharged projectile
45 /// @param registry The ECS registry
46 /// @param x X position
47 /// @param y Y position
48 /// @param velocityX X velocity
49 /// @param velocityY Y velocity
50 /// @return The created entity
51 ///
52 static ecs::Entity createSuperchargedProjectile(ecs::Registry &registry, float x, float y, float velocityX,
53 float velocityY);
54
55 private:
56 ///
57 /// @brief Create a projectile with given parameters
58 /// @param registry The ECS registry
59 /// @param type Projectile type
60 /// @param x X position
61 /// @param y Y position
62 /// @param velocityX X velocity
63 /// @param velocityY Y velocity
64 /// @return The created entity
65 ///
66 static ecs::Entity createProjectile(ecs::Registry &registry, ecs::Projectile::Type type, float x, float y,
67 float velocityX, float velocityY);
68 }; // class ProjectileManager
69} // namespace cli
This file contains the component definitions.
Configuration constants for the game.
This file contains the Registry class declaration.
Handles projectile creation and management.
ProjectileManager(const ProjectileManager &)=delete
~ProjectileManager()=default
ProjectileManager & operator=(ProjectileManager &&)=delete
static ecs::Entity createBasicProjectile(ecs::Registry &registry, float x, float y, float velocityX, float velocityY)
Create a basic projectile.
ProjectileManager & operator=(const ProjectileManager &)=delete
ProjectileManager(ProjectileManager &&)=delete
static ecs::Entity createSuperchargedProjectile(ecs::Registry &registry, float x, float y, float velocityX, float velocityY)
Create a supercharged projectile.
static ecs::Entity createProjectile(ecs::Registry &registry, ecs::Projectile::Type type, float x, float y, float velocityX, float velocityY)
Create a projectile with given parameters.
Class for managing entities and their components.
Definition Registry.hpp:25
std::uint32_t Entity
Definition Entity.hpp:13