dodatna logika

This commit is contained in:
2026-05-02 18:09:17 +02:00
parent 56d567b77d
commit e4389f035d
16 changed files with 239 additions and 37 deletions

View File

@@ -6,6 +6,7 @@
#include <game/agame/player.hpp>
#include <game/agame/background.hpp>
#include <game/agame/hudtext.hpp>
#include <game/gamemanager.hpp>
#include <renderer/renderer.hpp>
#include <renderer/texture.hpp>
#include <renderer/font.hpp>
@@ -17,6 +18,12 @@ using namespace Game;
int main() {
PLNIMP("Letnik3Zadnja - Licenca: LGPLv2.1-only, CC BY-SA 4.0");
// Prompt for player name before initializing the window/engine
std::string playerName;
std::cout << "Vnesi ime igralca (pritisni Enter za 'Igralec'): ";
std::getline(std::cin, playerName);
if (playerName.empty()) playerName = "Igralec";
Game::GameManager::setSharedData<std::string>("playerName", playerName);
Window::Window window = Window::Window();
window.init(1280, 720, "Game Window");