// // Created by Zoe Roux on 5/24/21. // #include #include #include #include #include #include #include #include #include "Runner.hpp" #include "Models/GameState.hpp" namespace BBM { void updateState(WAL::Wal &engine, GameState &state) { // You can change the scene here or update the game state based on entities values. // If you want to keep a scene loaded but not running, store it in the state.loadedScenes. // If you don't need the scene anymore, remember to remove it from the loadedScene array. } void enableRaylib(WAL::Wal &wal) { RAY::Window &window = RAY::Window::getInstance(600, 400, "Bomberman", FLAG_WINDOW_RESIZABLE); // wal.addSystem<>(); 3D elements here wal.addSystem(window) .addSystem>(); wal.addSystem(window); } WAL::Scene loadGameScene() { WAL::Scene scene; scene.addEntity("cube") .addComponent() .addComponent>(Vector2f(), Vector2f(1, 1), RED); return scene; } int run() { WAL::Wal wal; wal.addSystem(); enableRaylib(wal); WAL::Scene scene = loadGameScene(); wal.scene = scene; // wal.scene = loadGameScene(); try { wal.run(updateState); return 0; } catch (const std::exception &ex) { std::cerr << ex.what() << std::endl; return 1; } } }