R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
Wall.hpp
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2025
3** RTYPE
4** File description:
5** Wall.hpp - Component for wall/obstacle entities
6*/
7
8#pragma once
9
10#include "IComponent.hpp"
11
12namespace ecs {
20 class Wall : public IComponent {
21 public:
26 explicit Wall(bool destructible = false) : _destructible(destructible) {}
27
28 ~Wall() override = default;
29
34 bool isDestructible() const { return _destructible; }
35
40 void setDestructible(bool destructible) { _destructible = destructible; }
41
46 ComponentType getType() const override { return getComponentType<Wall>(); }
47
48 private:
50 };
51
52} // namespace ecs
Base interface for all ECS components.
Component for static or destructible walls/obstacles.
Definition Wall.hpp:20
bool _destructible
Can this wall be destroyed?
Definition Wall.hpp:49
bool isDestructible() const
Check if the wall is destructible.
Definition Wall.hpp:34
~Wall() override=default
Wall(bool destructible=false)
Constructor.
Definition Wall.hpp:26
void setDestructible(bool destructible)
Set destructible state.
Definition Wall.hpp:40
ComponentType getType() const override
Get the component type ID.
Definition Wall.hpp:46
Maximum number of distinct component types supported by the Registry.
Definition GameLogic.hpp:26
std::size_t ComponentType
Type alias for component identification.