aboutsummaryrefslogtreecommitdiff
path: root/src/includes
diff options
context:
space:
mode:
Diffstat (limited to 'src/includes')
-rw-r--r--src/includes/Game.hpp8
-rw-r--r--src/includes/State.hpp12
2 files changed, 15 insertions, 5 deletions
diff --git a/src/includes/Game.hpp b/src/includes/Game.hpp
index 4418ab3..a85d384 100644
--- a/src/includes/Game.hpp
+++ b/src/includes/Game.hpp
@@ -11,7 +11,7 @@ class Game
{
private:
sf::Font font;
- sf::Texture healthtex,neprijateljtex;
+ sf::Texture *healthtex,*neprijateljtex;
float dt;
sf::Clock sat,time;
@@ -30,12 +30,10 @@ class Game
void keyboard();
void run();
- void draw();
void stompmain();
void updateui();
void updatedt();
- bool gameover();
void respawn();
void position();
void checkcollision();
@@ -47,8 +45,10 @@ class Game
void updatewin();
public:
Game() {}
- Game(sf::RenderWindow *glprozor);
+ Game(sf::RenderWindow *glprozor,sf::Font font,sf::Texture *neprijateljtex,sf::Texture *healthtex);
void loop(bool ischanged,bool pause);
+ void draw();
+ bool gameover();
};
#endif
diff --git a/src/includes/State.hpp b/src/includes/State.hpp
index fdde7b8..453939f 100644
--- a/src/includes/State.hpp
+++ b/src/includes/State.hpp
@@ -7,8 +7,18 @@ class State
private:
sf::RenderWindow prozor;
int visina,sirina;
- bool ischanged=0,pause=0;
+ bool ischanged=0,newgame=0,pause=0,kraj=0;
+ sf::Font font;
+ sf::Texture healthtex,neprijateljtex;
+
+ sf::RectangleShape podloga;
+ sf::Text pausetext,krajtext;
+
+ void initassets();
+ void initwin();
+ void initui();
+ void updateui();
void events();
void keyboard();
public: