30 lines
675 B
C++
30 lines
675 B
C++
#include "Components.hpp"
|
|
#include "Draw.hpp"
|
|
#include "Entities.hpp"
|
|
#include "Entity.hpp"
|
|
#include "Systems.hpp"
|
|
|
|
#include "raylib-cpp.hpp"
|
|
|
|
int main() {
|
|
raylib::Window window(700, 460, "Gravity Surfing");
|
|
window.SetTargetFPS(60);
|
|
|
|
std::vector<Entity> entities;
|
|
entities.reserve(20);
|
|
|
|
auto &world = entities.emplace_back();
|
|
world.AddComponent<ScrollComponent>();
|
|
|
|
while (!window.ShouldClose()) {
|
|
float dt = window.GetFrameTime();
|
|
UpdateAllSystems(entities, dt);
|
|
window.BeginDrawing();
|
|
window.ClearBackground(raylib::Color::Black());
|
|
DrawSceneOutline();
|
|
window.EndDrawing();
|
|
}
|
|
|
|
return 0;
|
|
}
|