Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 15, 2018, 10:23:48 PM (5 years ago)
Author:
stadlero
Message:

Province is now a pawn

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/wagnis_HS18/src/modules/wagnis/WagnisProvince.cc

    r12102 r12107  
    55#include <vector>
    66
     7#define WAGNIS_PROVINCE_MAX_HEALTH 1000.0f
     8
     9/**TODO
     10 *
     11 *
     12 *
     13 **/
     14
    715namespace orxonox
    816{
     
    1018
    1119    //Constructor
    12     WagnisProvince::WagnisProvince(Context* context) : MovableEntity(context){
     20    WagnisProvince::WagnisProvince(Context* context) : Pawn(context){
    1321        RegisterObject(WagnisProvince);
    1422        this->owner_ID = 0;
     
    1826        this->neighbors = std::vector<WagnisProvince*>();
    1927        this->markerBillboard = nullptr;
     28        this->maxHealth_ = WAGNIS_PROVINCE_MAX_HEALTH;
     29        this->health_ = WAGNIS_PROVINCE_MAX_HEALTH-10.0f; // <-- DEBUG
    2030    }
    2131    //Destructor
    2232    WagnisProvince::~WagnisProvince(){
    2333
     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;        }
    2443    }
    2544
Note: See TracChangeset for help on using the changeset viewer.