38 lines
848 B
C++
38 lines
848 B
C++
#include "Components.hpp"
|
|
#include "Draw.hpp"
|
|
#include "EnergyBarRaygui.hpp"
|
|
#include "Entities.hpp"
|
|
#include "Entity.hpp"
|
|
#include "GameContext.hpp"
|
|
#include "SceneManager.hpp"
|
|
#include "Systems.hpp"
|
|
|
|
#include "raylib-cpp.hpp"
|
|
|
|
int main() {
|
|
raylib::Window window(700, 460, "Gravity Surfing");
|
|
window.SetState(FLAG_WINDOW_RESIZABLE);
|
|
window.SetTargetFPS(60);
|
|
|
|
// Initialize audio device early so we can play sound effects.
|
|
raylib::AudioDevice audioDevice;
|
|
|
|
SceneManager sceneManager;
|
|
sceneManager.ChangeScene<StartMenuScene>();
|
|
|
|
while (!window.ShouldClose()) {
|
|
float dt = window.GetFrameTime();
|
|
|
|
sceneManager.Update(dt);
|
|
|
|
window.BeginDrawing();
|
|
window.ClearBackground(raylib::Color(11, 15, 26, 255));
|
|
|
|
sceneManager.Draw();
|
|
|
|
window.EndDrawing();
|
|
}
|
|
|
|
return 0;
|
|
}
|