summaryrefslogtreecommitdiffhomepage
path: root/TestStage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TestStage.cpp')
-rw-r--r--TestStage.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/TestStage.cpp b/TestStage.cpp
index b851b0b..19703d2 100644
--- a/TestStage.cpp
+++ b/TestStage.cpp
@@ -5,6 +5,8 @@
#include <raylib.h>
#include "EnemyFactory.h"
+#include "Globals.h"
+#include "OverScreen.h"
static constexpr Color DEEPSPACE {3, 5, 22, 255};
@@ -48,6 +50,15 @@ TestStage::update(const float dt)
m_stats->total_bullets = m_const.m_bullets.size();
if (collided) m_stats->lifes--;
}
+ bool all_done = true;
+ for (const auto& enemy : m_enemies) {
+ if (!enemy.gone()) {
+ all_done = false;
+ break;
+ }
+ }
+ if (all_done)
+ g_game.set(std::make_unique<OverScreen>(m_stats));
}