From 8dcd75076a04f7afc8390ec2f0a7428f9c835cf8 Mon Sep 17 00:00:00 2001
From: Hauerch71498 <Hauerch71498@th-nuernberg.de>
Date: Mon, 18 Jan 2021 17:08:00 +0100
Subject: [PATCH] Chris Kommentare

---
 Bomber.cpp          | 2 ++
 Bomber.hpp          | 2 ++
 Enemy.cpp           | 2 ++
 Enemy.hpp           | 3 ++-
 Enemyprojectile.cpp | 3 ++-
 Enemyprojectile.hpp | 3 ++-
 Level.cpp           | 7 ++-----
 Projectile.cpp      | 3 ++-
 Projectile.hpp      | 2 ++
 Scoreb.cpp          | 2 +-
 Scoreb.hpp          | 1 +
 Tank.cpp            | 2 ++
 Tank.hpp            | 3 ++-
 Trooper.cpp         | 2 ++
 Trooper.hpp         | 3 ++-
 15 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/Bomber.cpp b/Bomber.cpp
index 0e962bb..8050578 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 4b3cbc6..c24ac0d 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 fb3a026..d38049f 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 55b37e8..a2c6d36 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 9f53cb3..f4d9dcb 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 0df7112..78971c7 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 0153d34..46acccb 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 1af2a50..e943b5c 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 a7368f4..1408ca3 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 d1b9df1..a84f60e 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 61062ab..f113068 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 1909666..731b7a1 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 c82700a..48e95d2 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 5fbb151..0fef0d0 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 458b0a2..3300cd5 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;
 
-- 
GitLab