Make app class
to handle everithing and easy porting
This commit is contained in:
23
inc/App.hpp
Normal file
23
inc/App.hpp
Normal 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;
|
||||
};
|
Reference in New Issue
Block a user