Minor refactor

This commit is contained in:
MihailRis 2023-11-16 03:03:17 +03:00
parent b03bcb5191
commit 9857d6e95a
3 changed files with 3 additions and 11 deletions

4
.gitignore vendored
View File

@ -6,7 +6,7 @@ Debug/voxel_engine
/build
/world
/worlds
/worlds/**/*
.vscode
@ -15,4 +15,4 @@ Debug/voxel_engine
.cproject
.project
.git
/Default/
/Default/

View File

@ -58,15 +58,6 @@ Engine::Engine(const EngineSettings& settings_) {
gui = new GUI();
std::cout << "-- initializing finished" << std::endl;
std::cout << "-- loading world" << std::endl;
//World* world = new World("world-1", enginefs::get_worlds_folder()/"world", 42, settings);
//vec3 playerPosition = vec3(0, 64, 0);
//Camera* camera = new Camera(playerPosition, radians(90.0f));
//Player* player = new Player(playerPosition, 4.0f, camera);
//setScreen(new LevelScreen(this, world->loadLevel(player, settings)));
setScreen(new MenuScreen(this));
}

View File

@ -40,6 +40,7 @@ MenuScreen::MenuScreen(Engine* engine_) : Screen(engine_) {
{
Button* button = new Button(L"Continue", vec4(12.0f, 10.0f, 12.0f, 10.0f));
button->listenAction([this, panel](GUI*) {
std::cout << "-- loading world" << std::endl;
EngineSettings& settings = engine->getSettings();
World* world = new World("world", enginefs::get_worlds_folder()/"world", 42, settings);
vec3 playerPosition = vec3(0, 64, 0);