Changeset 12107 for code/branches/wagnis_HS18/src/modules/wagnis
- Timestamp:
- Nov 15, 2018, 10:23:48 PM (6 years ago)
- Location:
- code/branches/wagnis_HS18/src/modules/wagnis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.cc
r12102 r12107 5 5 #include <vector> 6 6 7 #define WAGNIS_PROVINCE_MAX_HEALTH 1000.0f 8 9 /**TODO 10 * 11 * 12 * 13 **/ 14 7 15 namespace orxonox 8 16 { … … 10 18 11 19 //Constructor 12 WagnisProvince::WagnisProvince(Context* context) : MovableEntity(context){20 WagnisProvince::WagnisProvince(Context* context) : Pawn(context){ 13 21 RegisterObject(WagnisProvince); 14 22 this->owner_ID = 0; … … 18 26 this->neighbors = std::vector<WagnisProvince*>(); 19 27 this->markerBillboard = nullptr; 28 this->maxHealth_ = WAGNIS_PROVINCE_MAX_HEALTH; 29 this->health_ = WAGNIS_PROVINCE_MAX_HEALTH-10.0f; // <-- DEBUG 20 30 } 21 31 //Destructor 22 32 WagnisProvince::~WagnisProvince(){ 23 33 34 } 35 36 //Tick 37 void WagnisProvince::tick(float dt){ 38 SUPER(WagnisProvince, tick, dt); 39 40 if(this->health_ < this->maxHealth_){ 41 this->health_ = this->maxHealth_; 42 orxout() << "Health test ok" << endl; } 24 43 } 25 44 -
code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.h
r12104 r12107 10 10 #include "core/CoreIncludes.h" 11 11 #include "core/XMLPort.h" 12 #include "worldentities/ MovableEntity.h"12 #include "worldentities/pawns/Pawn.h" 13 13 #include "graphics/Billboard.h" 14 14 #include <vector> … … 17 17 namespace orxonox 18 18 { 19 class _WagnisExport WagnisProvince : public MovableEntity19 class _WagnisExport WagnisProvince : public Pawn 20 20 { 21 21 public: 22 22 WagnisProvince(Context*); 23 23 virtual ~WagnisProvince(); 24 void tick(float); 25 26 24 27 virtual void XMLPort(Element&,XMLPort::Mode); 25 28 void addMarkerBillboard(Billboard*); … … 38 41 void addNeighbor(WagnisProvince*); 39 42 std::vector<WagnisProvince*> neighbors; 43 40 44 41 45 int owner_ID;
Note: See TracChangeset
for help on using the changeset viewer.