diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-01-07 00:38:03 +0100 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-01-07 00:38:03 +0100 |
commit | 90fb1be2c0028513e0be35bc3791f426b6f500ec (patch) | |
tree | 34fd9496e0a0eda4edcbd67b768e8ab112d3844e | |
parent | weapons ready to be implemented. release v0.0.5 (diff) | |
download | threshold-90fb1be2c0028513e0be35bc3791f426b6f500ec.tar.gz threshold-90fb1be2c0028513e0be35bc3791f426b6f500ec.tar.bz2 threshold-90fb1be2c0028513e0be35bc3791f426b6f500ec.tar.xz threshold-90fb1be2c0028513e0be35bc3791f426b6f500ec.tar.zst threshold-90fb1be2c0028513e0be35bc3791f426b6f500ec.zip |
FINALLY
-rw-r--r-- | src/gameplay.cpp | 2 | ||||
-rw-r--r-- | src/wp_shotty.cpp | 2 | ||||
-rw-r--r-- | wp_shotty.cpp | 0 |
3 files changed, 2 insertions, 2 deletions
diff --git a/src/gameplay.cpp b/src/gameplay.cpp index 5b8e1bb..a2d306e 100644 --- a/src/gameplay.cpp +++ b/src/gameplay.cpp @@ -107,6 +107,7 @@ void Game::draw() const auto texSize = (enemies->at(0).radius / 40.0f); for (auto & en : *enemies) { + DrawCircle(en.posX, en.posY, en.radius, GREEN); if (en.hp == 0) DrawTextureEx(en.hurtTex, (Vector2){en.posX - 20, en.posY - 20}, 1.0f, 0.6f, WHITE); else { @@ -237,7 +238,6 @@ int Game::getKeys() const } } } else { - std::cout << "tick now" << std::endl; if (this->tick()) { return (1); } diff --git a/src/wp_shotty.cpp b/src/wp_shotty.cpp index 4efb64e..23c1074 100644 --- a/src/wp_shotty.cpp +++ b/src/wp_shotty.cpp @@ -19,7 +19,6 @@ int wp_shotty::bang(std::vector<Entity> * enemies, Vector2 playerDirection, Vect return (1); } else { barrel--; - std::cout << "BANG : " << barrel << "shots left" << std::endl; PlaySound(shot); // here // @@ -39,6 +38,7 @@ int wp_shotty::bang(std::vector<Entity> * enemies, Vector2 playerDirection, Vect CheckCollisionPointLine((Vector2){en->posX, en->posY}, playerPosition, Vector2Add(playerPosition, r), (en->radius * 2)) || CheckCollisionPointLine((Vector2){en->posX, en->posY}, playerPosition, add2, (en->radius * 2))) { // enemy hit + std::cout << "hit" << std::endl; en->hp--; if (en->hp == 0) { diff --git a/wp_shotty.cpp b/wp_shotty.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/wp_shotty.cpp |