You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
786 B
C++

#pragma once
#include <vector>
#include <memory>
#include <array>
#include "../../include/application/state.h" // HOW? WHY DOESN'T "application/state.h" LINK ON BY ITSELF
#include "core/corefactory.h"
class ClassicFactory;
class Application
{
public:
virtual ~Application() = default;
virtual bool init();
virtual void display() = 0;
virtual void run() = 0;
void input(const kku::SystemEvent& input);
void update(const kku::microsec& dt);
protected:
std::shared_ptr<kku::CoreFactory> _core_factory;
std::shared_ptr<ClassicFactory> _game_factory;
std::array<std::shared_ptr<GUIState>, GUIState::Tag::AMOUNT> _states;
std::vector<std::shared_ptr<GUIState>> _state_stack;
void pushState(GUIState::Tag new_state);
void popState();
};