restructure and add server/client example

This commit is contained in:
2025-01-24 10:34:04 +01:00
parent 729b475135
commit ec7b293bd5
30 changed files with 299 additions and 15 deletions

43
app/inc/App.hpp Normal file
View File

@@ -0,0 +1,43 @@
#include <array>
#include "canvas/Canvas.hpp"
#include "DnaStore.hpp"
class App
{
public:
App() = default;
~App() = default;
void init(int screenWidth, int screenHeight);
void update();
void draw();
void deinit();
private:
void upTex(Liked liked);
int screenWidth, screenHeight;
Canvas canvas;
int pos = 0;
std::array<RenderTexture2D, 2> canvasTexure = {0};
float rotation = 0.0f;
Vector2 mouseStart;
bool validHit = false;
float len;
float ofset;
Liked topLiked = Liked::tbd;
Rectangle destA;
Rectangle destB;
Rectangle likeBox;
Rectangle disLikeBox;
std::array<UiUnit, 2> unit = {0};
DnaManagerData manager;
Rectangle likedTextBox;
Rectangle genTextBox;
};