diff --git a/Bomber.cpp b/Bomber.cpp index 0e962bb18e5f414c0046a9eb75f2c2037eb2de42..80505783c0ede2e1cab1b9b5533be742605c75b1 100644 --- a/Bomber.cpp +++ b/Bomber.cpp @@ -1,4 +1,6 @@ #include "Bomber.hpp" +//WeberMa73121: implementation enum direction dir ersetzt int direcion--------------------------------------- +//Hauerch71498 ---------------------------------------------------------------------------------------------- Bomber::Bomber(float x, float y, enum direction dir, int animationstep) : Enemy(5,x,y,dir,animationstep) { diff --git a/Bomber.hpp b/Bomber.hpp index 4b3cbc65aab068a792c41daf7d25cc64ac1d06fa..c24ac0d59713ae0e21e6b8cb9794fe4737cc8fa2 100644 --- a/Bomber.hpp +++ b/Bomber.hpp @@ -2,6 +2,8 @@ #define BOMBER_HPP #include "Enemy.hpp" +//WeberMa73121: implementation enum direction dir ersetzt int direcion--------------------------------------- +//Hauerch71498 ---------------------------------------------------------------------------------------------- class Level; class Bomber: public Enemy diff --git a/Enemy.cpp b/Enemy.cpp index fb3a02610a9d069ee959e2df0de6ca6fa3077a42..d38049f75c7c99f129e78d7b2861fca2ca749371 100644 --- a/Enemy.cpp +++ b/Enemy.cpp @@ -1,6 +1,8 @@ #include "Enemy.hpp" #include "Level.hpp" #include "Enemyprojectile.hpp" +//WeberMa73121: implementation enum direction dir ersetzt int direcion--------------------------------------- +//Hauerch71498 ---------------------------------------------------------------------------------------------- Enemy::Enemy(int health,float x, float y, enum direction dir, int animationstep) { this->hitpoints = health; diff --git a/Enemy.hpp b/Enemy.hpp index 55b37e80ad24fbcb253deb127f580a4d8a035733..a2c6d36938dcc971887bad0c051d52ada7460e29 100644 --- a/Enemy.hpp +++ b/Enemy.hpp @@ -4,7 +4,8 @@ #include "Entity.hpp" #include "PixelBuffer.hpp" #include "Platform.hpp" - +//WeberMa73121: implementation enum direction dir ersetzt int direcion--------------------------------------- +//Hauerch71498 ---------------------------------------------------------------------------------------------- class Level; /* Vaterklasse Enemy ermöglicht es alle Kindklassen Enemytyp einfach anzusprechen. diff --git a/Enemyprojectile.cpp b/Enemyprojectile.cpp index 9f53cb35a487ef09281327c2e6e06e25e566fcca..f4d9dcbf60921eed8970e463081e297c1536cb60 100644 --- a/Enemyprojectile.cpp +++ b/Enemyprojectile.cpp @@ -1,7 +1,8 @@ #include "Enemyprojectile.hpp" #include "Platform.hpp" #include "Level.hpp" - +//WeberMa73121: implementation enum direction dir ersetzt int direction--------------------------------------- +//Hauerch71498 ---------------------------------------------------------------------------------------------- EnemyProjectile::EnemyProjectile(float x, float y, enum direction dir) : Projectile(x,y,dir) { diff --git a/Enemyprojectile.hpp b/Enemyprojectile.hpp index 0df71126e9addfd0edc2c57ea34170a9390e870f..78971c7ae6a2ee1007f4f6aa3f7419d81f7a5326 100644 --- a/Enemyprojectile.hpp +++ b/Enemyprojectile.hpp @@ -1,7 +1,8 @@ #ifndef ENEMYPROJECTILE_HPP #define ENEMYPROJECTILE_HPP #include "Projectile.hpp" - +//WeberMa73121: implementation enum direction dir ersetzt int direcion--------------------------------------- +//Hauerch71498 ---------------------------------------------------------------------------------------------- Color constexpr ENEMY_PROJECTILE_COLOR = _2; class EnemyProjectile: public Projectile { diff --git a/Level.cpp b/Level.cpp index 0153d34055fc5efd47470ddc07993f1051f9aec9..46acccb4be929d8896ee83cefcbc75fc6dcff211 100644 --- a/Level.cpp +++ b/Level.cpp @@ -175,7 +175,7 @@ bool Level::doDoSteps(FloatSeconds const &frame_time) it++; } } - +// <hauerch71498 ---------------------------------------------------------------------- for(auto it = projectileVector.begin(); it != projectileVector.end();){ auto& i = *it; if(i != nullptr &&!i->doStep(frame_time, *this)) @@ -187,7 +187,7 @@ bool Level::doDoSteps(FloatSeconds const &frame_time) it++; } } - +// hauerch71498> ---------------------------------------------------------------------- for(auto it = sceneryVector.begin(); it != sceneryVector.end();) { auto& i = *it; if(!i.step(player.getTopLeft(), frame_time, *this)) { @@ -255,14 +255,11 @@ bool Level::HitPlayer(float posX, float posY, int bufferWidth, int bufferHeigth) for(auto &i : this->enemyVector){ if(i != nullptr && collHelper(i->getTopLeft(), i->getSprite(), posX, posY, bufferWidth, bufferHeigth)) { - //HauerCh71498 - //{ if(i->takeDamage(PLAYER_PROJECTILE_COLOR) == 0) { score += i->getScore(); } return true; - //} } } return false; diff --git a/Projectile.cpp b/Projectile.cpp index 1af2a50d5d42d13bf122229c849a4c0086e6cfff..e943b5c266c0ebf1cf0d1e3ea0af9913e1609732 100644 --- a/Projectile.cpp +++ b/Projectile.cpp @@ -1,5 +1,6 @@ #include "Projectile.hpp" - +//WeberMa73121: implementation enum direction dir ersetzt int direction--------------------------------------- +//Hauerch71498 ---------------------------------------------------------------------------------------------- Projectile::Projectile(float x, float y, enum direction dir) { this->x = x; diff --git a/Projectile.hpp b/Projectile.hpp index a7368f4caf558c7aefe9087a619c817c62059be6..1408ca3e1dba763a0c20b55d82c5284ff991d800 100644 --- a/Projectile.hpp +++ b/Projectile.hpp @@ -2,6 +2,8 @@ #define PROJECTILE_HPP #include "Platform.hpp" +//WeberMa73121: implementation enum direction dir ersetzt int direcion--------------------------------------- +//Hauerch71498 ---------------------------------------------------------------------------------------------- class Level; class Projectile diff --git a/Scoreb.cpp b/Scoreb.cpp index d1b9df1c4585a2c97232c390cd09e22961ea5e6d..a84f60e24a2a1a977224ed61aa7c30aff570a7bb 100644 --- a/Scoreb.cpp +++ b/Scoreb.cpp @@ -1,5 +1,5 @@ #include "Scoreb.hpp" - +//Hauerch71498 ---------------------------------------------------------------------------------------------- Score::Score(int W,int H) { GameOverPos.x = W/2-16; diff --git a/Scoreb.hpp b/Scoreb.hpp index 61062ab314473b1acb0b6f02ce50dc9d94038ddf..f1130689f85563ed6a25103b440f91aab484b9e6 100644 --- a/Scoreb.hpp +++ b/Scoreb.hpp @@ -3,6 +3,7 @@ #include "Level.hpp" #include "Position.hpp" #include "PixelBuffer.hpp" +//Hauerch71498 ---------------------------------------------------------------------------------------------- class ScoreB { public: diff --git a/Tank.cpp b/Tank.cpp index 1909666bc2a24614f0001d14c19fbe576b6031a4..731b7a10816017668ba3e95fac2433236144541e 100644 --- a/Tank.cpp +++ b/Tank.cpp @@ -1,4 +1,6 @@ #include "Tank.hpp" +//WeberMa73121: implementation enum direction dir ersetzt int direction--------------------------------------- +//Hauerch71498 ---------------------------------------------------------------------------------------------- Tank::Tank(float x, float y, enum direction dir, int animationstep) : Enemy(3,x,y,dir,animationstep) { diff --git a/Tank.hpp b/Tank.hpp index c82700a349a0fe0df762f64238bc7846d7735b7d..48e95d2cbd36e5629c30cb3f6e7b2c3d21c869db 100644 --- a/Tank.hpp +++ b/Tank.hpp @@ -2,7 +2,8 @@ #define TANK_HPP #include "Enemy.hpp" #include "Level.hpp" - +//WeberMa73121: implementation enum direction dir ersetzt int direcion--------------------------------------- +//Hauerch71498 ---------------------------------------------------------------------------------------------- class Tank: public Enemy // Fight the Power! { public: diff --git a/Trooper.cpp b/Trooper.cpp index 5fbb151fc00cbe2d2c0360a170df9b0303f83cb7..0fef0d0115934cff9f71b6bedb4c48924652f1aa 100644 --- a/Trooper.cpp +++ b/Trooper.cpp @@ -1,5 +1,7 @@ #include "Level.hpp" #include "Trooper.hpp" +//WeberMa73121: implementation enum direction dir ersetzt int direction--------------------------------------- +//Hauerch71498 ---------------------------------------------------------------------------------------------- Trooper::Trooper(float x, float y, enum direction dir, int animationstep) : Enemy(1,x,y,dir,animationstep) diff --git a/Trooper.hpp b/Trooper.hpp index 458b0a2a950e3fb16c9f4ff808bff5480f803d7a..3300cd50c0246b66e1ea6f7fb5fcc94ec6c288ed 100644 --- a/Trooper.hpp +++ b/Trooper.hpp @@ -1,6 +1,7 @@ #ifndef TROOPER_HPP #define TROOPER_HPP - +//WeberMa73121: implementation enum direction dir ersetzt int direcion--------------------------------------- +//Hauerch71498 ---------------------------------------------------------------------------------------------- #include "Enemy.hpp" class Level;