Changeset 11727
- Timestamp:
- Feb 11, 2018, 3:44:49 PM (7 years ago)
- Location:
- code/branches/Presentation_HS17_merge/src/modules/asteroids2D
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2D.cc
r11726 r11727 54 54 #include "Asteroids2DShip.h" // Necessary for getPlayer function. Do NOT include this in Header! 55 55 #include "Asteroids2DStone.h" 56 #include "Asteroids2DCenterPoint.h" 57 #include "Asteroids2DHUDinfo.h" 56 58 #include "core/CoreIncludes.h" 57 59 #include "Highscore.h" 60 #include "gamestates/GSLevel.h" 58 61 59 62 namespace orxonox … … 79 82 } 80 83 81 84 void Asteroids2D::setCenterpoint(Asteroids2DCenterPoint* center) 85 { 86 this->center_ = center; 87 } 82 88 83 89 void Asteroids2D::levelUp() -
code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2D.h
r11669 r11727 43 43 #include "asteroids2D/Asteroids2DPrereqs.h" 44 44 45 #include "Asteroids2DCenterPoint.h" // Necessary for WeakPointer??46 //#include "Asteroids2DShip.h" DO NOT include in Header. Will cause forward declaration issues47 48 //#include "Asteroids2DHUDinfo.h"49 50 51 #include "core/EventIncludes.h"52 #include "core/command/Executor.h"53 #include "core/config/ConfigValueIncludes.h"54 55 #include "gamestates/GSLevel.h"56 #include "chat/ChatManager.h"57 58 // ! HACK59 #include "infos/PlayerInfo.h"60 61 #include "core/command/ConsoleCommand.h"62 63 45 #include "gametypes/Deathmatch.h" 64 46 #include "tools/Timer.h" … … 91 73 //Generate Stones 92 74 void spawnStone(); 93 void setCenterpoint(Asteroids2DCenterPoint* center) 94 { this->center_ = center; } 75 void setCenterpoint(Asteroids2DCenterPoint* center); 76 95 77 void addPoints(int numPoints); 96 78 virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command -
code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DCenterPoint.h
r11660 r11727 38 38 #include "asteroids2D/Asteroids2DPrereqs.h" 39 39 40 //#include "Asteroids2D.h"41 //#include "Asteroids2DHUDinfo.h"42 43 40 #include "worldentities/StaticEntity.h" 44 41 -
code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DHUDinfo.cc
r11669 r11727 30 30 #include "core/XMLPort.h" 31 31 #include "util/Convert.h" 32 //#include "Asteroids2D.h"32 #include "Asteroids2D.h" 33 33 34 34 namespace orxonox -
code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DHUDinfo.h
r11669 r11727 31 31 #define _Asteroids2DHUDinfo_H__ 32 32 33 //#include "Asteroids2DShip.h"34 #include "Asteroids2D.h"35 //#include "Asteroids2DCenterPoint.h"36 37 33 #include "asteroids2D/Asteroids2DPrereqs.h" 38 34 … … 59 55 private: 60 56 Asteroids2D* Asteroids2DGame; 61 bool bShowLives_;62 bool bShowLevel_;63 57 bool bShowPoints_; 64 58 -
code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DPrereqs.h
r11669 r11727 70 70 class Asteroids2D; 71 71 class Asteroids2DCenterPoint; 72 class Asteroids2DHUDinfo; 72 73 class Asteroids2DShip; 73 class Asteroids2DCube; 74 //class Asteroids2DEnemy; 75 //class Asteroids2DEnemyShooter; 76 //class Asteroids2DWeapon; 77 //class Asteroids2DWeaponEnemy; 78 //class Asteroids2DHUDinfo; 74 class Asteroids2DStone; 75 class Asteroids2DWeapon; 79 76 } 80 77 -
code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DShip.cc
r11668 r11727 35 35 #include "Asteroids2DShip.h" 36 36 #include "Asteroids2DStone.h" 37 #include "Asteroids2D.h" 37 38 #include "core/CoreIncludes.h" 38 39 … … 45 46 RegisterObject(Asteroids2DShip); 46 47 47 isFireing= false;48 this->bImmune = false; 48 49 this->width = 1043; 49 50 this->height = 646; … … 91 92 void Asteroids2DShip::boost(bool bBoost) 92 93 { 93 isFireing = bBoost;94 94 } 95 95 -
code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DShip.h
r11668 r11727 38 38 #include "asteroids2D/Asteroids2DPrereqs.h" 39 39 40 41 #include "core/XMLPort.h"42 40 #include "worldentities/pawns/SpaceShip.h" 43 #include "weapons/WeaponsPrereqs.h"44 #include "graphics/Camera.h"45 46 #include "Asteroids2D.h" // Is necessary for getGame function47 //#include "Asteroids2DCenterPoint.h"48 #include "Asteroids2DStone.h"49 50 41 #include "tools/Timer.h" 51 52 42 53 43 namespace orxonox … … 67 57 68 58 virtual inline bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override; 69 70 bool isFireing;71 59 72 60 /*Functions that can be helpful while debugging. -
code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DWeapon.cc
r11669 r11727 35 35 36 36 #include "core/CoreIncludes.h" 37 // #include "core/XMLPort.h"38 // #include "core/command/Executor.h"39 37 40 38 #include "graphics/Model.h" … … 42 40 #include "weaponsystem/WeaponPack.h" 43 41 #include "weaponsystem/WeaponSystem.h" 44 #include "worldentities/WorldEntity.h"45 #include "worldentities/pawns/Pawn.h"46 42 47 43 #include "weapons/projectiles/Projectile.h" 48 44 #include "weapons/MuzzleFlash.h" 49 50 #include "Asteroids2D.h"51 45 52 46 namespace orxonox … … 65 59 66 60 } 67 68 Asteroids2D* Asteroids2DWeapon::getGame()69 {70 if (game == nullptr)71 {72 for (Asteroids2D* race : ObjectList<Asteroids2D>())73 {74 game = race;75 }76 }77 return game;78 }79 80 61 81 62 void Asteroids2DWeapon::shot() -
code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DWeapon.h
r11669 r11727 40 40 #include "weapons/weaponmodes/HsW01.h" 41 41 42 #include "Asteroids2D.h"43 44 42 namespace orxonox 45 43 { … … 49 47 Asteroids2DWeapon(Context* context); 50 48 virtual ~Asteroids2DWeapon(); 51 Asteroids2D* getGame();52 53 49 54 50 protected: 55 51 virtual void shot() override; //2D movement 56 52 WeakPtr<Projectile> projectile; 57 WeakPtr<Asteroids2D> game;58 53 }; 59 54 }
Note: See TracChangeset
for help on using the changeset viewer.