diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-01-13 23:47:15 +0100 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-01-13 23:47:15 +0100 |
commit | 1befc82eafb13146427ec941e4240c846a7e6ac2 (patch) | |
tree | 5e368b404bf64cd04ada76b86c7b605adc9c75d9 /src/gameplay.cpp | |
parent | what the fuck is going on (diff) | |
download | threshold-1befc82eafb13146427ec941e4240c846a7e6ac2.tar.gz threshold-1befc82eafb13146427ec941e4240c846a7e6ac2.tar.bz2 threshold-1befc82eafb13146427ec941e4240c846a7e6ac2.tar.xz threshold-1befc82eafb13146427ec941e4240c846a7e6ac2.tar.zst threshold-1befc82eafb13146427ec941e4240c846a7e6ac2.zip |
shit background image featureing hit-- bowser. I meant bowser...
Diffstat (limited to 'src/gameplay.cpp')
-rw-r--r-- | src/gameplay.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gameplay.cpp b/src/gameplay.cpp index 49b86cc..88da5ec 100644 --- a/src/gameplay.cpp +++ b/src/gameplay.cpp @@ -57,6 +57,7 @@ Game::Game(std::string const& path) : current(path) { } ifs.close(); enemies = new std::vector<Entity>; + InitAudioDevice(); AWeapon* shotty = new wp_shotty(SHOTTY_BANG, SHOTTY_RELOAD @@ -94,7 +95,6 @@ Game::Game(std::string const& path) : current(path) { player->radius = 10; player->victims = 0; player->fury = 0; - InitAudioDevice(); crosshair = LoadTexture(CROSSHAIR_TEX); @@ -109,6 +109,7 @@ Game::Game(std::string const& path) : current(path) { player->idleTex = LoadTexture(MUCHACHO_TEX); } + Game::~Game() { delete enemies; delete player; @@ -132,7 +133,7 @@ void Game::draw() { cam.target.x = player->posX; EndMode2D(); - auto texSize = (enemies->at(0).radius / 40.0f); + for (auto& en : *enemies) { DrawCircle(en.posX, en.posY, en.radius, GREEN); if (en.hp == 0) |