dodatna logika
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user