Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 18, 2011, 6:52:21 PM (13 years ago)
Author:
jo
Message:

Pawn&SpaceShip Colouring via XML works. Quick&Dirty implementation though. A clean version is going to follow.

Location:
code/branches/gamecontent/src/orxonox/worldentities/pawns
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamecontent/src/orxonox/worldentities/pawns/Pawn.cc

    r8904 r8942  
    6060        this->bReload_ = false;
    6161
     62        this->team_ = -1;
    6263        this->health_ = 0;
    6364        this->maxHealth_ = 0;
     
    110111        SUPER(Pawn, XMLPort, xmlelement, mode);
    111112
     113        XMLPortParam(Pawn, "team", setTeam, getTeam, xmlelement, mode).defaultValues(-1);
     114
    112115        XMLPortParam(Pawn, "health", setHealth, getHealth, xmlelement, mode).defaultValues(100);
    113116        XMLPortParam(Pawn, "maxhealth", setMaxHealth, getMaxHealth, xmlelement, mode).defaultValues(200);
     
    129132        XMLPortParam(Pawn, "reloadrate", setReloadRate, getReloadRate, xmlelement, mode).defaultValues(0);
    130133        XMLPortParam(Pawn, "reloadwaittime", setReloadWaitTime, getReloadWaitTime, xmlelement, mode).defaultValues(1.0f);
     134
     135
    131136    }
    132137
  • code/branches/gamecontent/src/orxonox/worldentities/pawns/Pawn.h

    r8891 r8942  
    3535#include "interfaces/PickupCarrier.h"
    3636#include "interfaces/RadarViewable.h"
     37#include "interfaces/PartyMember.h"
    3738#include "worldentities/ControllableEntity.h"
    3839
     
    4041{ // tolua_export
    4142    class _OrxonoxExport Pawn // tolua_export
    42         : public ControllableEntity, public RadarViewable, public PickupCarrier
     43        : public ControllableEntity, public RadarViewable, public PickupCarrier//, public PartyMember
    4344    { // tolua_export
    4445        friend class WeaponSystem;
     
    5354            inline bool isAlive() const
    5455                { return this->bAlive_; }
     56
     57            inline void setTeam(int team)
     58                { this->team_ = team; }
     59            inline float getTeam() const
     60                { return this->team_; }
    5561
    5662            virtual void setHealth(float health);
     
    194200                { return NULL; }
    195201
     202            int team_;
     203
    196204            float health_;
    197205            float maxHealth_;
Note: See TracChangeset for help on using the changeset viewer.