diff options
author | Aki <please@ignore.pl> | 2022-04-18 20:14:53 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-04-18 20:15:05 +0200 |
commit | bbec07ab3de333649d14a64fa01f7e8ad6d56c58 (patch) | |
tree | 06a4cb6e677388da4865075229e4db4090418b83 /TestStage.cpp | |
parent | a5f91f4d56106112565239c283441432c443c4d2 (diff) | |
download | bullethell2022-bbec07ab3de333649d14a64fa01f7e8ad6d56c58.zip bullethell2022-bbec07ab3de333649d14a64fa01f7e8ad6d56c58.tar.gz bullethell2022-bbec07ab3de333649d14a64fa01f7e8ad6d56c58.tar.bz2 |
Added naive enemy
This reminds me ECS a bit too much but I don't think I want to
implement one right now...
Diffstat (limited to 'TestStage.cpp')
-rw-r--r-- | TestStage.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/TestStage.cpp b/TestStage.cpp index b257cf6..cc90f19 100644 --- a/TestStage.cpp +++ b/TestStage.cpp @@ -1,10 +1,12 @@ #include "TestStage.h" +#include "ExampleGenerator.h" + TestStage::TestStage() : m_player {}, m_const {}, - m_generator {m_const.m_bullets} + m_enemy {std::make_unique<ExampleGenerator>(m_const.m_bullets)} { } @@ -13,7 +15,7 @@ void TestStage::update(const float dt) { m_player.update(dt); - m_generator.update(dt); + m_enemy.update(dt); m_const.update(dt); bool collided = m_player.collide(m_const.m_bullets); (void) collided; @@ -24,6 +26,7 @@ void TestStage::draw() { m_const.draw(); + m_enemy.draw(); m_player.draw(); } |