R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
OrbitalSystem.hpp
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2025
3** RTYPE
4** File description:
5** OrbitalSystem - Updates orbital module positions
6*/
7
8#pragma once
9
10#include "../../Components/OrbitalModule.hpp"
11#include "../../Components/Transform.hpp"
12#include "../ISystem.hpp"
13
14namespace ecs {
23 class OrbitalSystem : public ISystem {
24 public:
28 OrbitalSystem() = default;
29
33 ~OrbitalSystem() override = default;
34
46 void update(Registry &registry, float deltaTime) override;
47
53 ComponentMask getComponentMask() const override;
54
55 private:
65 void updateOrbitalPosition(Registry &registry, Address moduleEntity, OrbitalModule &orbital,
66 Transform &transform, float deltaTime);
67 };
68} // namespace ecs
Base interface for all ECS systems.
Definition ISystem.hpp:37
Component for entities that orbit around a parent entity (like drones in Isaac).
System managing orbital module movement around parent entities.
void update(Registry &registry, float deltaTime) override
Updates all orbital module positions.
OrbitalSystem()=default
Default constructor.
~OrbitalSystem() override=default
Default destructor.
void updateOrbitalPosition(Registry &registry, Address moduleEntity, OrbitalModule &orbital, Transform &transform, float deltaTime)
Updates a single orbital module's position.
ComponentMask getComponentMask() const override
Gets the component mask for this system.
Manages entities, their signatures and component type registrations.
Definition Registry.hpp:68
Component representing position, rotation and scale in 2D space.
Definition Transform.hpp:20
Maximum number of distinct component types supported by the Registry.
Definition GameLogic.hpp:26
std::uint32_t Address
Type used to represent an entity address/ID.
std::uint64_t ComponentMask
Type alias for component bitmask.
Definition ISystem.hpp:24