Add DNA to background
This commit is contained in:
@@ -1,39 +1,33 @@
|
||||
#include <vector>
|
||||
|
||||
#include "canvas/Sun.hpp"
|
||||
#include "values/Dna.hpp"
|
||||
|
||||
#include <raylib.h>
|
||||
|
||||
struct Moon
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
float size;
|
||||
};
|
||||
|
||||
class BackGround
|
||||
{
|
||||
|
||||
public:
|
||||
BackGround() = default;
|
||||
~BackGround() = default;
|
||||
void init(int size);
|
||||
void init(int canvasSize);
|
||||
void deinit();
|
||||
void newGen();
|
||||
void draw();
|
||||
void draw(Dna *dna);
|
||||
|
||||
private:
|
||||
void drawStars();
|
||||
void drawSun();
|
||||
void drawMounten(size_t mountenSegments, int min, int max, Color color);
|
||||
|
||||
Dna *m_dna;
|
||||
|
||||
uint128 mountenSeed;
|
||||
uint128 starSeed;
|
||||
|
||||
Sun sun;
|
||||
|
||||
Moon m_moon;
|
||||
int colorSet;
|
||||
int time;
|
||||
|
||||
int size = 0;
|
||||
int canvasSize = 0;
|
||||
|
||||
constexpr static size_t numOfStarts = 150;
|
||||
constexpr static float moonXOffset = 0.1f;
|
||||
|
||||
Reference in New Issue
Block a user