RPG/include/GameLoop.h
2024-02-22 00:32:57 -08:00

44 lines
599 B
C++

#pragma once
#include <vector>
#include <string>
class Level;
class GameLoop
{
private:
std::vector<Level*> lvls;
bool running;
public:
GameLoop();
GameLoop(GameLoop&& gl) noexcept;
GameLoop(const GameLoop& gl);
GameLoop& operator=(GameLoop&& gl) noexcept;
GameLoop& operator=(const GameLoop& gl);
bool HasLevel(size_t hashId) const;
bool HasLevel(const std::string& id) const;
bool AddLevel(Level* newLvl);
Level* GetLevel(size_t hashId) const;
Level* GetLevel(const std::string& id) const;
void Update();
void Render();
void Tick();
void Start();
void Stop();
};