[Updated] Backgrounds to display the desired portion of the image, [Added] Start of the Game class

This commit is contained in:
Ninjaws
2024-12-09 22:29:08 +01:00
parent 76dd80d3a3
commit cbf6e658ea
15 changed files with 323 additions and 143 deletions
+20 -28
View File
@@ -1,36 +1,28 @@
#ifndef SCREEN_H
#define SCREEN_H
#include <vector>
#include "Text.h"
#include "raylib.h"
#include <optional>
#include "Background.h"
#include "Map.h"
class Screen
{
private:
protected:
// std::optional<Map> map;
// std::optional<Camera2D> camera;
// std::optional<Map> map;
// std::optional<Background> background;
// std::vector<Text> text;
class Screen {
private:
protected:
// std::optional<Map> map;
std::optional<Camera2D> camera;
std::optional<Map> map;
std::optional<Background> background;
std::vector<Text> text;
public:
Screen();
~Screen(){}
/**
* Execute all logic for this frame
*/
virtual void logic() = 0;
/**
* Draw frame to the screen
*/
void draw();
public:
Screen(){}
~Screen() {}
/**
* Execute all logic for this frame
*/
virtual void logic() = 0;
/**
* Draw frame to the screen
*/
virtual void draw() = 0;
};
#endif