diff options
| author | aleksav013 <aleksav013@gmail.com> | 2021-06-06 01:45:47 +0200 |
|---|---|---|
| committer | aleksav013 <aleksav013@gmail.com> | 2021-06-06 01:45:47 +0200 |
| commit | 060ddd25ef18a6289d01283bc76bc4da90bf2a39 (patch) | |
| tree | 9b59683089b08a5cacb606be09738c78ed88e493 /src/includes | |
| parent | bf4e10748f20572a8b69da99c97bf5cd17f8b250 (diff) | |
Adding powerup content; Fixing dt bug
Diffstat (limited to 'src/includes')
| -rw-r--r-- | src/includes/Enemy1.hpp | 2 | ||||
| -rw-r--r-- | src/includes/Enemy2.hpp | 2 | ||||
| -rw-r--r-- | src/includes/Enemy3.hpp | 2 | ||||
| -rw-r--r-- | src/includes/Game.hpp | 1 | ||||
| -rw-r--r-- | src/includes/Player.hpp | 3 | ||||
| -rw-r--r-- | src/includes/Powerup.hpp | 4 |
6 files changed, 9 insertions, 5 deletions
diff --git a/src/includes/Enemy1.hpp b/src/includes/Enemy1.hpp index 0405365..9c7f7f3 100644 --- a/src/includes/Enemy1.hpp +++ b/src/includes/Enemy1.hpp @@ -5,7 +5,7 @@ class Enemy1:public Entity { private: - float vx,vy; + float vx=0,vy=0; public: static float time; Enemy1():Entity() {} diff --git a/src/includes/Enemy2.hpp b/src/includes/Enemy2.hpp index 25555a4..c619c54 100644 --- a/src/includes/Enemy2.hpp +++ b/src/includes/Enemy2.hpp @@ -5,7 +5,7 @@ class Enemy2:public Entity { private: - float vx,vy; + float vx=0,vy=0; public: static float time; Enemy2():Entity() {} diff --git a/src/includes/Enemy3.hpp b/src/includes/Enemy3.hpp index e1498bf..c1e1227 100644 --- a/src/includes/Enemy3.hpp +++ b/src/includes/Enemy3.hpp @@ -5,7 +5,7 @@ class Enemy3:public Entity { private: - float vx,vy; + float vx=0,vy=0; public: static float time; Enemy3():Entity() {} diff --git a/src/includes/Game.hpp b/src/includes/Game.hpp index 765fa2c..b04b1c3 100644 --- a/src/includes/Game.hpp +++ b/src/includes/Game.hpp @@ -40,6 +40,7 @@ class Game void initshapes(); void initui(); void inittex(); + void pwptex(); void initent(); void updatewin(); public: diff --git a/src/includes/Player.hpp b/src/includes/Player.hpp index ff094e9..2c6a776 100644 --- a/src/includes/Player.hpp +++ b/src/includes/Player.hpp @@ -7,13 +7,14 @@ class Player:public Entity public: int health,xp; int stomprad=270; - float stomptime; + float stomptime,vampirictime; sf::CircleShape krug; Player():Entity() {} Player(sf::Vector2f pozicija,sf::Vector2f velicina,sf::Color boja); void updatest(float dt); + void updatevt(float dt); }; #endif diff --git a/src/includes/Powerup.hpp b/src/includes/Powerup.hpp index 2b6ec72..8a4d7db 100644 --- a/src/includes/Powerup.hpp +++ b/src/includes/Powerup.hpp @@ -6,8 +6,10 @@ class Powerup:public Entity { public: static float time; + int type; Powerup():Entity() {} - Powerup(sf::Vector2f pozicija,sf::Vector2f velicina,sf::Color boja); + Powerup(sf::Vector2f pozicija,sf::Vector2f velicina,sf::Color boja,int vrsta); + void respawn(int sirina,int visina,int vrsta); }; #endif |
