[Orxonox-commit 7254] r11869 - code/branches/3DPacman_FS18/src/modules/Pacman

dreherm at orxonox.net dreherm at orxonox.net
Mon Apr 16 23:50:31 CEST 2018


Author: dreherm
Date: 2018-04-16 23:50:31 +0200 (Mon, 16 Apr 2018)
New Revision: 11869

Modified:
   code/branches/3DPacman_FS18/src/modules/Pacman/Pacman.cc
   code/branches/3DPacman_FS18/src/modules/Pacman/Pacman.h
Log:
Tes Game 4

Modified: code/branches/3DPacman_FS18/src/modules/Pacman/Pacman.cc
===================================================================
--- code/branches/3DPacman_FS18/src/modules/Pacman/Pacman.cc	2018-04-16 21:37:28 UTC (rev 11868)
+++ code/branches/3DPacman_FS18/src/modules/Pacman/Pacman.cc	2018-04-16 21:50:31 UTC (rev 11869)
@@ -36,6 +36,7 @@
 #include "PacmanGelb.h"
 #include "PacmanGhost.h"
 #include "PacmanPointSphere.h"
+#include "Highscore.h"
 
 namespace orxonox
 {
@@ -46,7 +47,7 @@
         RegisterObject(Pacman);
 
         lives = 3;
-        point = 0:
+        point = 0;
         level = 1;
         Vector3 startposplayer = Vector3(0,10,245);
 
@@ -76,11 +77,11 @@
             currentPosition = player->getWorldPosition();
         }
 
-        bool bcolli = false;
+        bcolli = false;
         for(int nrghost = 0, (nrghost<3) && (!bcolli), ++nrghost){
             bcolli = collis(ghosts[nrghost]->getPosition(), currentPosition)
         }
-        if(collis){
+        if(bcolli){
             this->catched();
         }
 
@@ -136,7 +137,11 @@
         return nullptr;
     }
 
+    int Pacman::getPoints(){
+        return point;
+    }
 
+
     void Pacman::start()
     {
         orxout() << "start" << endl;

Modified: code/branches/3DPacman_FS18/src/modules/Pacman/Pacman.h
===================================================================
--- code/branches/3DPacman_FS18/src/modules/Pacman/Pacman.h	2018-04-16 21:37:28 UTC (rev 11868)
+++ code/branches/3DPacman_FS18/src/modules/Pacman/Pacman.h	2018-04-16 21:50:31 UTC (rev 11869)
@@ -37,7 +37,6 @@
 
 #include "PacmanGelb.h"
 
-
 #include "core/EventIncludes.h"
 #include "core/command/Executor.h"
 #include "core/config/ConfigValueIncludes.h"
@@ -73,8 +72,9 @@
             bool collis(Vector3 one, Vector3 other);
             void catched();
             void posreset();
-            void takePoint();
-            void getPlayer();
+            void takePoint(PacmanPointSphere* taken);
+            PacmanGelb* getPlayer();
+            int getPoints();
 
 
             bool bEndGame;
@@ -90,12 +90,10 @@
             PacmanGelb* player;
             PacmanGhost[] 
             Vector3 currentPosition;
+            bool bcolli = false;
 
 
             Timer endGameTimer;
-            WeakPtr<PlayerInfo> playerInfo_;
-
-            WeakPtr<DodgeRaceCenterPoint> center_;
             int level;
             int point;
             bool b_combo;
@@ -130,4 +128,4 @@
     };
 }
 
-#endif /* _DodgeRace_H__ */
+#endif /* _DodgeRace_H__ */
\ No newline at end of file



More information about the Orxonox-commit mailing list