summaryrefslogtreecommitdiffhomepage
path: root/ExampleGenerator.h
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-04-20 00:28:48 +0200
committerAki <please@ignore.pl>2022-04-20 00:28:48 +0200
commitfd9232b3d3a3aee28a5965a5ebc4077f8db7c652 (patch)
treee9bdb832ed15704f5640ffc9543131f02e6e6e32 /ExampleGenerator.h
parent5f0c15b2d3299ea210a78d54e9b10c3cb4266139 (diff)
downloadbullethell2022-fd9232b3d3a3aee28a5965a5ebc4077f8db7c652.zip
bullethell2022-fd9232b3d3a3aee28a5965a5ebc4077f8db7c652.tar.gz
bullethell2022-fd9232b3d3a3aee28a5965a5ebc4077f8db7c652.tar.bz2
Streamlined enemy composition
Diffstat (limited to 'ExampleGenerator.h')
-rw-r--r--ExampleGenerator.h10
1 files changed, 8 insertions, 2 deletions
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 <memory>
+
#include <raylib.h>
#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<Vector2> position, ConstantVelocityBullet::Vector& bullets);
void update(float dt) override;
+private:
+ std::shared_ptr<Vector2> m_position;
ConstantVelocityBullet::Vector& m_bullets;
float m_delay;
float m_interval;