R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
Enemy.hpp
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2025
3** RTYPE
4** File description:
5** Enemy
6*/
7
8#pragma once
9
10#include "IComponent.hpp"
11
12namespace ecs {
20 class Enemy : public IComponent {
21 public:
27 Enemy(int enemyType, int scoreValue) : _enemyType(enemyType), _scoreValue(scoreValue) {}
28 ~Enemy() override = default;
29
34 int getEnemyType() const { return _enemyType; }
35
40 int getScoreValue() const { return _scoreValue; }
41
46 void setEnemyType(int enemyType) { _enemyType = enemyType; }
47
52 void setScoreValue(int scoreValue) { _scoreValue = scoreValue; }
53
58 ComponentType getType() const override { return getComponentType<Enemy>(); }
59
60 private:
63 };
64} // namespace ecs
Component identifying an entity as an enemy with AI behavior.
Definition Enemy.hpp:20
int _scoreValue
Score points awarded on destruction.
Definition Enemy.hpp:62
void setScoreValue(int scoreValue)
Set score value.
Definition Enemy.hpp:52
int getScoreValue() const
Get score value.
Definition Enemy.hpp:40
void setEnemyType(int enemyType)
Set enemy type.
Definition Enemy.hpp:46
int _enemyType
Enemy type/classification.
Definition Enemy.hpp:61
int getEnemyType() const
Get enemy type.
Definition Enemy.hpp:34
ComponentType getType() const override
Get the component type ID.
Definition Enemy.hpp:58
Enemy(int enemyType, int scoreValue)
Constructor with enemy parameters.
Definition Enemy.hpp:27
~Enemy() override=default
Base interface for all ECS components.
Maximum number of distinct component types supported by the Registry.
Definition GameLogic.hpp:26
std::size_t ComponentType
Type alias for component identification.