diff options
author | Aki <please@ignore.pl> | 2022-04-18 11:35:25 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-04-18 11:35:25 +0200 |
commit | 7c9c492f1555bb84a43fc68a56f69c25b54e7346 (patch) | |
tree | f7594050ed5f0f3a8f4100b9cae081ff3a73a995 /TestStage.cpp | |
parent | 9026eea38124b73b17f19b137dbc71eab4a7a2e9 (diff) | |
download | bullethell2022-7c9c492f1555bb84a43fc68a56f69c25b54e7346.zip bullethell2022-7c9c492f1555bb84a43fc68a56f69c25b54e7346.tar.gz bullethell2022-7c9c492f1555bb84a43fc68a56f69c25b54e7346.tar.bz2 |
Separated Stage from GameScreen
Diffstat (limited to 'TestStage.cpp')
-rw-r--r-- | TestStage.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/TestStage.cpp b/TestStage.cpp new file mode 100644 index 0000000..b257cf6 --- /dev/null +++ b/TestStage.cpp @@ -0,0 +1,35 @@ +#include "TestStage.h" + + +TestStage::TestStage() : + m_player {}, + m_const {}, + m_generator {m_const.m_bullets} +{ +} + + +void +TestStage::update(const float dt) +{ + m_player.update(dt); + m_generator.update(dt); + m_const.update(dt); + bool collided = m_player.collide(m_const.m_bullets); + (void) collided; +} + + +void +TestStage::draw() +{ + m_const.draw(); + m_player.draw(); +} + + +int +TestStage::total_bullets() const +{ + return m_const.m_bullets.size(); +} |