Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 26, 2011, 10:06:08 AM (13 years ago)
Author:
jo
Message:

Removing interface - no actual need for it, since only two classes are necessary to have a teamnumber. Prepared tutorial level for new HUD feature.

Location:
code/branches/gamecontent/src/orxonox
Files:
2 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamecontent/src/orxonox/controllers/ArtificialController.h

    r8891 r8951  
    5151            void abandonTarget(Pawn* target);
    5252
    53             inline void setTeam(int team)
     53            inline void setTeam(int team) //TODO: write through to controllable entity.
    5454                { this->team_ = team; }
    5555            inline int getTeam() const
  • code/branches/gamecontent/src/orxonox/gametypes/TeamGametype.cc

    r8942 r8951  
    5959        static ColourValue colours[] =
    6060        {
    61             ColourValue(1.0f, 0.3f, 0.3f),
    62             ColourValue(0.3f, 0.3f, 1.0f),
     61            ColourValue(0.2f, 0.2f, 1.0f),
     62            ColourValue(1.0f, 0.1f, 0.1f),
    6363            ColourValue(0.3f, 1.0f, 0.3f),
    64             ColourValue(1.0f, 1.0f, 0.0f)
     64            ColourValue(1.0f, 1.0f, 0.0f),
     65            ColourValue(0.0f, 1.0f, 1.0f),
     66            ColourValue(1.0f, 0.0f, 1.0f),
     67            ColourValue(7.0f, 7.0f, 7.0f),
     68            ColourValue(2.0f, 2.0f, 2.0f)
    6569        };
    6670        static std::vector<ColourValue> defaultcolours(colours, colours + sizeof(colours) / sizeof(ColourValue));
  • code/branches/gamecontent/src/orxonox/interfaces/CMakeLists.txt

    r8942 r8951  
    66  PickupListener.cc
    77  RadarViewable.cc
    8   PartyMember.cc
    98)
  • code/branches/gamecontent/src/orxonox/worldentities/ControllableEntity.cc

    r8923 r8951  
    8787        this->setPriority( Priority::VeryHigh );
    8888        this->registerVariables();
     89        this->team_ = -1;
    8990    }
    9091
     
    119120        SUPER(ControllableEntity, XMLPort, xmlelement, mode);
    120121
     122        XMLPortParam(ControllableEntity, "team", setTeam, getTeam, xmlelement, mode).defaultValues(-1);
    121123        XMLPortParam(ControllableEntity, "hudtemplate", setHudTemplate, getHudTemplate, xmlelement, mode);
    122124        XMLPortParam(ControllableEntity, "camerapositiontemplate", setCameraPositionTemplate, getCameraPositionTemplate, xmlelement, mode);
  • code/branches/gamecontent/src/orxonox/worldentities/ControllableEntity.h

    r8923 r8951  
    163163                { return this->target_.get(); }
    164164            void setTargetInternal( uint32_t targetID );
     165
     166            inline void setTeam(int team)
     167                { this->team_ = team; }
     168            inline float getTeam() const
     169                { return this->team_; }
    165170
    166171        protected:
     
    237242            CameraPosition* reverseCamera_;
    238243            WeakPtr<WorldEntity> target_;
     244
     245            int team_ ; //<! teamnumber
    239246    };
    240247}
  • code/branches/gamecontent/src/orxonox/worldentities/pawns/Pawn.cc

    r8942 r8951  
    6060        this->bReload_ = false;
    6161
    62         this->team_ = -1;
    6362        this->health_ = 0;
    6463        this->maxHealth_ = 0;
     
    110109    {
    111110        SUPER(Pawn, XMLPort, xmlelement, mode);
    112 
    113         XMLPortParam(Pawn, "team", setTeam, getTeam, xmlelement, mode).defaultValues(-1);
    114111
    115112        XMLPortParam(Pawn, "health", setHealth, getHealth, xmlelement, mode).defaultValues(100);
  • code/branches/gamecontent/src/orxonox/worldentities/pawns/Pawn.h

    r8942 r8951  
    3535#include "interfaces/PickupCarrier.h"
    3636#include "interfaces/RadarViewable.h"
    37 #include "interfaces/PartyMember.h"
    3837#include "worldentities/ControllableEntity.h"
    3938
     
    4140{ // tolua_export
    4241    class _OrxonoxExport Pawn // tolua_export
    43         : public ControllableEntity, public RadarViewable, public PickupCarrier//, public PartyMember
     42        : public ControllableEntity, public RadarViewable, public PickupCarrier
    4443    { // tolua_export
    4544        friend class WeaponSystem;
     
    5554                { return this->bAlive_; }
    5655
    57             inline void setTeam(int team)
    58                 { this->team_ = team; }
    59             inline float getTeam() const
    60                 { return this->team_; }
    6156
    6257            virtual void setHealth(float health);
     
    200195                { return NULL; }
    201196
    202             int team_;
    203197
    204198            float health_;
Note: See TracChangeset for help on using the changeset viewer.