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