aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameplay.cpp
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2022-01-14 01:49:11 +0100
committersalaaad2 <arthurdurant263@gmail.com>2022-01-14 01:49:11 +0100
commit42a5777b370853f8957c101956a300d7991977e5 (patch)
treea1092b8e45358accbeff2926f28ca4b4967c6190 /src/gameplay.cpp
parentbackground can now be specified in map file (diff)
downloadthreshold-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.cpp12
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;
+}