diff options
Diffstat (limited to 'battles')
-rw-r--r-- | battles/src/RandomSpawner.h | 6 | ||||
-rw-r--r-- | battles/src/Spawner.h | 21 |
2 files changed, 25 insertions, 2 deletions
diff --git a/battles/src/RandomSpawner.h b/battles/src/RandomSpawner.h index 7505ae8..1ef2f20 100644 --- a/battles/src/RandomSpawner.h +++ b/battles/src/RandomSpawner.h @@ -4,6 +4,8 @@ #include <kurator/battles/components.h> +#include "Spawner.h" + namespace kurator { @@ -11,11 +13,11 @@ namespace battles { -class RandomSpawner +class RandomSpawner : public Spawner { public: RandomSpawner(int total_teams, double distance, double variation); - Transform get(int team); + Transform get(int team) override; private: const double angle_step; std::random_device device; diff --git a/battles/src/Spawner.h b/battles/src/Spawner.h new file mode 100644 index 0000000..ebae699 --- /dev/null +++ b/battles/src/Spawner.h @@ -0,0 +1,21 @@ +#pragma once + +#include <kurator/battles/components.h> + + +namespace kurator +{ +namespace battles +{ + + +class Spawner +{ +public: + virtual ~Spawner() = default; + virtual Transform get(int team) = 0; +}; + + +} // namespace battles +} // namespace kurator |