summaryrefslogtreecommitdiffhomepage
path: root/TestStage.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-04-18 11:35:25 +0200
committerAki <please@ignore.pl>2022-04-18 11:35:25 +0200
commit7c9c492f1555bb84a43fc68a56f69c25b54e7346 (patch)
treef7594050ed5f0f3a8f4100b9cae081ff3a73a995 /TestStage.cpp
parent9026eea38124b73b17f19b137dbc71eab4a7a2e9 (diff)
downloadbullethell2022-7c9c492f1555bb84a43fc68a56f69c25b54e7346.zip
bullethell2022-7c9c492f1555bb84a43fc68a56f69c25b54e7346.tar.gz
bullethell2022-7c9c492f1555bb84a43fc68a56f69c25b54e7346.tar.bz2
Separated Stage from GameScreen
Diffstat (limited to 'TestStage.cpp')
-rw-r--r--TestStage.cpp35
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();
+}