diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-01-07 00:33:33 +0100 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-01-07 00:33:44 +0100 |
commit | 43852f3019c02645e625946fe8c237070eef6a2f (patch) | |
tree | e78b3423e6cda8e8d9dd3a5ef23e15184571978e /src/gameplay.cpp | |
parent | almost there (diff) | |
download | threshold-43852f3019c02645e625946fe8c237070eef6a2f.tar.gz threshold-43852f3019c02645e625946fe8c237070eef6a2f.tar.bz2 threshold-43852f3019c02645e625946fe8c237070eef6a2f.tar.xz threshold-43852f3019c02645e625946fe8c237070eef6a2f.tar.zst threshold-43852f3019c02645e625946fe8c237070eef6a2f.zip |
weapons ready to be implemented. release v0.0.5
Diffstat (limited to '')
-rw-r--r-- | src/gameplay.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gameplay.cpp b/src/gameplay.cpp index d60c5ca..5b8e1bb 100644 --- a/src/gameplay.cpp +++ b/src/gameplay.cpp @@ -10,6 +10,7 @@ #include "raymath.h" #include <fstream> +#include <iostream> #include <raylib.h> #include "weapon.hpp" @@ -213,6 +214,7 @@ int Game::getKeys() const player->direction = Vector2Rotate(player->direction, 0.1f); } if (IsKeyPressed(KEY_SPACE)) { + std::cout << "key space"; if (shoot()) { return (0); } @@ -235,6 +237,7 @@ int Game::getKeys() const } } } else { + std::cout << "tick now" << std::endl; if (this->tick()) { return (1); } @@ -257,7 +260,7 @@ Game::shoot() const if (player->wp->empty == true) { return (0); } - player->wp->bang(enemies, player->direction, (Vector2){player->posX, player->posY}); + player->wp->bang(enemies, player->direction, (Vector2){player->posX, player->posY}, &player->victims); if (player->wp->empty == true) { player->reloadTime = GetTime(); } |