[Added] Gun angling

This commit is contained in:
Ninjaws
2024-12-13 00:24:51 +01:00
parent dbeb15ee60
commit 88e0b7cb05
8 changed files with 333 additions and 228 deletions
+2
View File
@@ -1,6 +1,7 @@
#include "screens/GameScreen.h"
#include "entities/Map.h"
#include "services/StateService.h"
#include "services/GameService.h"
GameScreen::GameScreen()
{
@@ -12,6 +13,7 @@ GameScreen::GameScreen()
// this->map = Map();
this->game = Game();
// GameService::getInstance().setGame(this->game);
// this->camera = camera;
}
+2 -2
View File
@@ -29,13 +29,13 @@ TitleScreen::TitleScreen()
AudioService::getInstance().playMusic();
}
InputService::getInstance().setKeysToWatch({KEY_ENTER}, {});
InputService::getInstance().setKeysToWatch({KEY_ENTER}, {MOUSE_BUTTON_LEFT});
}
void TitleScreen::logic()
{
// std::cout << "Next screen!" << std::endl;
if (InputService::getInstance().isKeyPressed(KEY_ENTER))
if (InputService::getInstance().isKeyPressed(KEY_ENTER) || InputService::getInstance().isMouseButtonPressed(MOUSE_BUTTON_LEFT))
{
StateService::getInstance().setScreen(EScreen::MAIN);
}