Add BackGround

add stary night
This commit is contained in:
Nikola Petrov
2024-03-09 17:18:17 +01:00
parent ad8296dd7d
commit e6f102266c
5 changed files with 144 additions and 3 deletions

22
inc/BackGround.hpp Normal file
View File

@@ -0,0 +1,22 @@
#include <vector>
#include "raylib.h"
class BackGround
{
public:
BackGround() = default;
~BackGround() = default;
void init(int size);
void newGen();
private:
void starts();
void mounten();
void drawMounten(std::vector<float> &data, int line, int varience, Color color);
size_t numOfStarts = 150;
Color starColor = WHITE;
int size = 0;
Texture2D texShapes = {1, 1, 1, 1, 7};
};

View File

@@ -1,4 +1,5 @@
#include "raylib.h"
#include "BackGround.hpp"
#include "Tree.hpp"
class Canvas
@@ -13,6 +14,7 @@ public:
void deinit();
private:
BackGround backGround;
Tree tree;
RenderTexture2D target = {0};
};