aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameplay.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/gameplay.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gameplay.cpp b/src/gameplay.cpp
index 4368954..90b6603 100644
--- a/src/gameplay.cpp
+++ b/src/gameplay.cpp
@@ -1,5 +1,8 @@
#include "gameplay.hpp"
+#include <iostream>
+
+
Enemy::Enemy(void)
{
posX = GetRandomValue(0, SCREENWIDTH);
@@ -12,12 +15,19 @@ Game::~Game() {}
Game::Game(void)
{
- nEnemies = GetRandomValue(0, 15);
+ nEnemies = GetRandomValue(5, 15);
- enemies = new Enemy[15];
+ enemies = new std::vector<Enemy>(nEnemies);
}
void Game::start() const
{
+ std::cout << "----- Gameplay: Start -----" << std::endl;
+ std::cout << "Gameplay: " << nEnemies << "enemies need to be spawned" << std::endl;
+
+ for (auto & en : *enemies)
+ {
+ DrawCircleV(en.direction, 10, RED);
+ }
}