Move DNA from Canvas to App

This commit is contained in:
2024-12-21 01:04:22 +01:00
parent 2a215ead5f
commit fc7d33fb3c
4 changed files with 13 additions and 12 deletions

View File

@@ -16,11 +16,13 @@ private:
int pos = 0;
int screenWidth, screenHeight;
Canvas canvas;
std::array< RenderTexture2D, 2> canvasTexure = { 0 };
std::array<RenderTexture2D, 2> canvasTexure = {0};
float rotation = 0.0f;
Rectangle destB;
Rectangle destA;
Dna dna = {0};
Vector2 mouseStart;
float len;
float ofset;

View File

@@ -10,11 +10,9 @@ public:
~Canvas() = default;
void init(int size);
void deinit();
void newGen(RenderTexture2D &target);
void newGen(RenderTexture2D &target, Dna *dna);
private:
BackGround backGround;
Tree tree;
Dna dna = {0};
};