Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5873 in orxonox.OLD for branches


Ignore:
Timestamp:
Dec 2, 2005, 3:21:58 PM (19 years ago)
Author:
manuel
Message:

powerup and extendable work

Location:
branches/powerups/src/world_entities/power_ups
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/powerups/src/world_entities/power_ups/power_up.cc

    r5871 r5873  
    2323using namespace std;
    2424
    25 
    26 
    27 PowerUp::PowerUp (PowerUpType type)
    28 {
    29   this->init();
    30 }
    31 
    32 PowerUp::PowerUp(const TiXmlElement* root)
    33 {
    34   this->init();
    35   this->loadParams(root);
    36 }
    37 
    38 void PowerUp::init() {
    39   this->setClassID(CL_POWER_UP, "PowerUp");
    40   this->type = type;
    41 }
     25PowerUp::PowerUp() { }
    4226
    4327PowerUp::~PowerUp () {}
  • branches/powerups/src/world_entities/power_ups/power_up.h

    r5871 r5873  
    99#include "world_entity.h"
    1010
    11 typedef enum PowerUpType
    12 {
    13   PWR_UP_NULL,
    14   PWR_UP_SHIELD,
    15   PWR_UP_WEAPON,
    16 } PowerUpType;
    17 
    1811class PowerUp : public WorldEntity {
    1912
    2013public:
    21   PowerUp(PowerUpType type = PWR_UP_NULL);
    22   PowerUp(const TiXmlElement* root);
    23   virtual ~PowerUp ();
    2414  void loadParams(const TiXmlElement* root);
    2515  void collidesWith (WorldEntity* entity, const Vector& location);
    2616
    27 private:
    28   PowerUpType type;
    29   void init();
     17protected:
     18  PowerUp();
     19  virtual ~PowerUp ();
    3020};
    3121
Note: See TracChangeset for help on using the changeset viewer.