[Updated] Backgrounds to display the desired portion of the image, [Added] Start of the Game class
This commit is contained in:
+20
-28
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user