From fd9232b3d3a3aee28a5965a5ebc4077f8db7c652 Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 20 Apr 2022 00:28:48 +0200 Subject: Streamlined enemy composition --- ExampleGenerator.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ExampleGenerator.h') diff --git a/ExampleGenerator.h b/ExampleGenerator.h index 2710d03..6db4151 100644 --- a/ExampleGenerator.h +++ b/ExampleGenerator.h @@ -1,15 +1,21 @@ #pragma once +#include + #include #include "ConstantVelocity.h" #include "Generator.h" -struct ExampleGenerator : public Generator +class ExampleGenerator : public Generator { - explicit ExampleGenerator(ConstantVelocityBullet::Vector& bullets); +public: + friend class EnemyFactory; + ExampleGenerator(std::shared_ptr position, ConstantVelocityBullet::Vector& bullets); void update(float dt) override; +private: + std::shared_ptr m_position; ConstantVelocityBullet::Vector& m_bullets; float m_delay; float m_interval; -- cgit v1.1