Make app class

to handle everithing and easy porting
This commit is contained in:
Nikola Petrov
2024-03-06 11:16:19 +01:00
parent cf006e05e0
commit 05d0f63535
3 changed files with 79 additions and 39 deletions

23
inc/App.hpp Normal file
View File

@@ -0,0 +1,23 @@
#include <array>
#include "Tree.hpp"
class App
{
public:
App(int screenWidth, int screenHeight);
~App() = default;
void init();
void update();
void draw();
void deinit();
private:
int pos = 0;
int screenWidth, screenHeight;
std::array<Tree, 2> trees;
Vector2 center;
float rotation = 0.0f;
Rectangle destB;
Rectangle destA;
};