[Added] Start of player class, start of collision detection

This commit is contained in:
Ninjaws
2024-12-10 19:26:48 +01:00
parent 97d93ab113
commit 774dc3806b
18 changed files with 433 additions and 50 deletions
+3 -3
View File
@@ -6,13 +6,13 @@
class GameScreen: public Screen {
private:
Game game;
protected:
public:
GameScreen();
void logic() override;
void draw() override;
private:
Game game;
};
#endif
+6 -6
View File
@@ -6,6 +6,12 @@
#include "entities/Text.h"
class MainScreen : public Screen {
public:
MainScreen();
void logic() override;
void draw() override;
private:
int hoveredButton = 0;
std::vector<Text> buttons;
@@ -13,12 +19,6 @@ private:
void mouseLogic();
void keyboardLogic();
void clickLogic();
public:
MainScreen();
void logic() override;
void draw() override;
};
#endif
+3 -8
View File
@@ -3,14 +3,6 @@
class Screen
{
private:
protected:
// std::optional<Map> map;
// std::optional<Camera2D> camera;
// std::optional<Map> map;
// std::optional<Background> background;
// std::vector<Text> text;
public:
Screen(){}
~Screen() {}
@@ -23,6 +15,9 @@ public:
* Draw frame to the screen
*/
virtual void draw() = 0;
private:
};
#endif
+4 -4
View File
@@ -6,15 +6,15 @@
#include "entities/Text.h"
class TitleScreen : public Screen {
private:
Music bg;
std::vector<Text> text;
public:
TitleScreen();
void logic() override;
void draw() override;
private:
Music bg;
std::vector<Text> text;
};
#endif
+4 -5
View File
@@ -7,17 +7,16 @@
class TutorialScreen : public Screen
{
private:
std::vector<Text> text;
Background background;
protected:
public:
TutorialScreen();
~TutorialScreen() {}
void logic() override;
void draw() override;
private:
std::vector<Text> text;
Background background;
};
#endif