diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-01-14 01:49:11 +0100 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-01-14 01:49:11 +0100 |
commit | 42a5777b370853f8957c101956a300d7991977e5 (patch) | |
tree | a1092b8e45358accbeff2926f28ca4b4967c6190 /src/gameplay.cpp | |
parent | background can now be specified in map file (diff) | |
download | threshold-42a5777b370853f8957c101956a300d7991977e5.tar.gz threshold-42a5777b370853f8957c101956a300d7991977e5.tar.bz2 threshold-42a5777b370853f8957c101956a300d7991977e5.tar.xz threshold-42a5777b370853f8957c101956a300d7991977e5.tar.zst threshold-42a5777b370853f8957c101956a300d7991977e5.zip |
add license, better next screen and begin savestate
Diffstat (limited to '')
-rw-r--r-- | src/gameplay.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/gameplay.cpp b/src/gameplay.cpp index dd395ca..ba1c07a 100644 --- a/src/gameplay.cpp +++ b/src/gameplay.cpp @@ -102,11 +102,6 @@ Game::Game(std::string const& path) : current(path) { crosshair = LoadTexture(CROSSHAIR_TEX); - cam.target = (Vector2){player->posX, player->posY}; - cam.offset = (Vector2){SCREENWIDTH / 2.0f, SCREENHEIGHT / 2.0f}; - cam.rotation = 0.0f; - cam.zoom = 1.0f; - player->wp[0] = shotty; player->wp[1] = ar; player->currentWeapon = player->wp[0]; @@ -135,11 +130,8 @@ void Game::start() { void Game::draw() { auto left = std::to_string(enemies->size()); - cam.target.x = player->posX; - EndMode2D(); 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); @@ -342,3 +334,7 @@ std::string const& Game::getCurrent() const { std::string const& Game::getBackground() const { return background; } + +int const& Game::getKills() const { + return player->victims; +} |