diff options
author | Aki <please@ignore.pl> | 2022-04-18 22:27:08 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-04-18 22:27:08 +0200 |
commit | 9dc6e5dcc108cd887891756a54748aab62f19626 (patch) | |
tree | 5285196b76d3cc999b833b77535153b4a25b0271 /TestStage.cpp | |
parent | 60672810d676498f610657e4c17931d15483b7d4 (diff) | |
download | bullethell2022-9dc6e5dcc108cd887891756a54748aab62f19626.zip bullethell2022-9dc6e5dcc108cd887891756a54748aab62f19626.tar.gz bullethell2022-9dc6e5dcc108cd887891756a54748aab62f19626.tar.bz2 |
Fiddled with enemy building and test generator
Diffstat (limited to 'TestStage.cpp')
-rw-r--r-- | TestStage.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/TestStage.cpp b/TestStage.cpp index 653d3c2..2ce4118 100644 --- a/TestStage.cpp +++ b/TestStage.cpp @@ -11,9 +11,12 @@ TestStage::TestStage() : m_const {} { m_enemies.reserve(2); - for (const float x : {200.f, 600.f}) { - Enemy enemy(std::make_unique<ExampleGenerator>(m_const.m_bullets)); - enemy.set_position(x, 20.f); + for (const float x : {300.f, 500.f}) { + auto generator = std::make_unique<ExampleGenerator>(m_const.m_bullets); + if (x > 400.f) + generator->m_direction *= -1; + Enemy enemy(std::move(generator)); + enemy.set_position(x, 100.f); m_enemies.push_back(std::move(enemy)); } } |