Changeset 8951 for code/branches/gamecontent/src
- Timestamp:
- Nov 26, 2011, 10:06:08 AM (13 years ago)
- 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 51 51 void abandonTarget(Pawn* target); 52 52 53 inline void setTeam(int team) 53 inline void setTeam(int team) //TODO: write through to controllable entity. 54 54 { this->team_ = team; } 55 55 inline int getTeam() const -
code/branches/gamecontent/src/orxonox/gametypes/TeamGametype.cc
r8942 r8951 59 59 static ColourValue colours[] = 60 60 { 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), 63 63 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) 65 69 }; 66 70 static std::vector<ColourValue> defaultcolours(colours, colours + sizeof(colours) / sizeof(ColourValue)); -
code/branches/gamecontent/src/orxonox/interfaces/CMakeLists.txt
r8942 r8951 6 6 PickupListener.cc 7 7 RadarViewable.cc 8 PartyMember.cc9 8 ) -
code/branches/gamecontent/src/orxonox/worldentities/ControllableEntity.cc
r8923 r8951 87 87 this->setPriority( Priority::VeryHigh ); 88 88 this->registerVariables(); 89 this->team_ = -1; 89 90 } 90 91 … … 119 120 SUPER(ControllableEntity, XMLPort, xmlelement, mode); 120 121 122 XMLPortParam(ControllableEntity, "team", setTeam, getTeam, xmlelement, mode).defaultValues(-1); 121 123 XMLPortParam(ControllableEntity, "hudtemplate", setHudTemplate, getHudTemplate, xmlelement, mode); 122 124 XMLPortParam(ControllableEntity, "camerapositiontemplate", setCameraPositionTemplate, getCameraPositionTemplate, xmlelement, mode); -
code/branches/gamecontent/src/orxonox/worldentities/ControllableEntity.h
r8923 r8951 163 163 { return this->target_.get(); } 164 164 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_; } 165 170 166 171 protected: … … 237 242 CameraPosition* reverseCamera_; 238 243 WeakPtr<WorldEntity> target_; 244 245 int team_ ; //<! teamnumber 239 246 }; 240 247 } -
code/branches/gamecontent/src/orxonox/worldentities/pawns/Pawn.cc
r8942 r8951 60 60 this->bReload_ = false; 61 61 62 this->team_ = -1;63 62 this->health_ = 0; 64 63 this->maxHealth_ = 0; … … 110 109 { 111 110 SUPER(Pawn, XMLPort, xmlelement, mode); 112 113 XMLPortParam(Pawn, "team", setTeam, getTeam, xmlelement, mode).defaultValues(-1);114 111 115 112 XMLPortParam(Pawn, "health", setHealth, getHealth, xmlelement, mode).defaultValues(100); -
code/branches/gamecontent/src/orxonox/worldentities/pawns/Pawn.h
r8942 r8951 35 35 #include "interfaces/PickupCarrier.h" 36 36 #include "interfaces/RadarViewable.h" 37 #include "interfaces/PartyMember.h"38 37 #include "worldentities/ControllableEntity.h" 39 38 … … 41 40 { // tolua_export 42 41 class _OrxonoxExport Pawn // tolua_export 43 : public ControllableEntity, public RadarViewable, public PickupCarrier //, public PartyMember42 : public ControllableEntity, public RadarViewable, public PickupCarrier 44 43 { // tolua_export 45 44 friend class WeaponSystem; … … 55 54 { return this->bAlive_; } 56 55 57 inline void setTeam(int team)58 { this->team_ = team; }59 inline float getTeam() const60 { return this->team_; }61 56 62 57 virtual void setHealth(float health); … … 200 195 { return NULL; } 201 196 202 int team_;203 197 204 198 float health_;
Note: See TracChangeset
for help on using the changeset viewer.