Dicewars-Siedler/src/engine/core/Application.h
2026-02-07 18:19:25 +01:00

39 lines
645 B
C++

//
// Created by sebastian on 23.12.25.
//
#ifndef DICEWARS_SIEDLER_APPLICATION_H
#define DICEWARS_SIEDLER_APPLICATION_H
#include <memory>
#include <vector>
#include "Window.h"
class Layer;
class Application
{
public:
Application();
~Application();
void run();
void close() {running = false;}
static Application& getInstance();
[[nodiscard]] Window& getWindow() const {return *window;}
private:
bool running = true;
std::unique_ptr<Window> window;
static Application* instance;
std::vector<Layer*> layers;
protected:
void pushLayer(Layer* layer);
};
#endif //DICEWARS_SIEDLER_APPLICATION_H