aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameplay.cpp
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2022-01-17 01:31:38 +0100
committersalaaad2 <arthurdurant263@gmail.com>2022-01-17 01:31:38 +0100
commitc8b23f73e44fd5be7d653cc82e89212da4e5bc72 (patch)
treeb6f215212227ea4c2ffd079d52553078ee9f1ea8 /src/gameplay.cpp
parentwhat ? (diff)
downloadthreshold-c8b23f73e44fd5be7d653cc82e89212da4e5bc72.tar.gz
threshold-c8b23f73e44fd5be7d653cc82e89212da4e5bc72.tar.bz2
threshold-c8b23f73e44fd5be7d653cc82e89212da4e5bc72.tar.xz
threshold-c8b23f73e44fd5be7d653cc82e89212da4e5bc72.tar.zst
threshold-c8b23f73e44fd5be7d653cc82e89212da4e5bc72.zip
buff shotty & audio is now working I guess ???? ?
Diffstat (limited to 'src/gameplay.cpp')
-rw-r--r--src/gameplay.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gameplay.cpp b/src/gameplay.cpp
index 543969a..3dfdd5e 100644
--- a/src/gameplay.cpp
+++ b/src/gameplay.cpp
@@ -124,7 +124,7 @@ void Game::draw() {
auto left = std::to_string(enemies->size());
for (auto& en : *enemies) {
- if (en.hp == 0)
+ if (en.hp <= 0)
DrawTextureEx(en.hurtTex,
(Vector2){en.posX - en.radius, en.posY - en.radius},
1.0f, 0.6f, WHITE);
@@ -174,9 +174,6 @@ int Game::tick() {
auto v2 = (Vector2){target.x - player->posX, target.y - player->posY};
- DrawText(std::to_string(v2.x).c_str(), 1400, 10, 20, RED);
- DrawText(std::to_string(v2.y).c_str(), 1400, 30, 20, RED);
-
player->direction = v2;
if (player->victims == nPerWave && nWaves > 1) {