Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5434 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Oct 25, 2005, 11:38:46 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: Turret Power Up defined

Location:
trunk/src/world_entities/power_ups
Files:
2 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/power_ups/power_up.cc

    r5433 r5434  
    2727{
    2828  this->setClassID(CL_POWER_UP, "PowerUp");
     29
    2930}
    3031
     
    3435
    3536
     37void PowerUp::loadParam(const TiXmlElement* root)
     38{
     39  static_cast<WorldEntity*>(this)->loadParams(root);
     40
     41}
     42
  • trunk/src/world_entities/power_ups/power_up.h

    r5433 r5434  
    99#include "world_entity.h"
    1010
    11 class PowerUp : WorldEntity {
     11class PowerUp : public WorldEntity {
    1212
    1313 public:
    1414  PowerUp ();
    1515  virtual ~PowerUp ();
    16 
     16  void loadParam(const TiXmlElement* root);
    1717};
    1818
  • trunk/src/world_entities/power_ups/turret_power_up.cc

    r5433 r5434  
    1 
    2 
    31/*
    42   orxonox - the future of 3D-vertical-scrollers
     
    1210
    1311   ### File Specific:
    14    main-programmer: ...
     12   main-programmer: Benjamin Grauer
    1513   co-programmer: ...
    1614*/
    1715
    1816
    19 #include "power_up.h"
    20 
     17#include "turret_power_up.h"
     18#include "factory.h"
    2119
    2220using namespace std;
    2321
     22CREATE_FACTORY(TurretPowerUp);
    2423
    2524
    26 PowerUp::PowerUp ()
     25TurretPowerUp::TurretPowerUp ()
    2726{
    28   this->setClassID(CL_POWER_UP, "PowerUp");
     27  this->init();
     28}
     29
     30TurretPowerUp::TurretPowerUp(const TiXmlElement* root)
     31{
     32  this->init();
     33
     34  this->loadParams(root);
    2935}
    3036
    3137
    32 
    33 PowerUp::~PowerUp () {}
     38TurretPowerUp::~TurretPowerUp () {}
    3439
    3540
     41void TurretPowerUp::init()
     42{
     43  this->setClassID(CL_TURRET_POWER_UP, "TurretPowerUp");
     44  this->loadModel("models/guns/turret1.obj");
     45}
     46
     47
     48void TurretPowerUp::loadParams(const TiXmlElement* root)
     49{
     50  static_cast<PowerUp*>(this)->loadParams(root);
     51
     52}
  • trunk/src/world_entities/power_ups/turret_power_up.h

    r5433 r5434  
    11/*!
    2  * @file power_up.h
     2 * @file turret_power_up.h
    33 * @brief A class representing a PowerUp in the world.
    44*/
    55
    6 #ifndef _POWER_UP_H
    7 #define _POWER_UP_H
     6#ifndef _TURRET_POWER_UP_H
     7#define _TURRET_POWER_UP_H
    88
    9 #include "world_entity.h"
     9#include "power_up.h"
    1010
    11 class PowerUp : WorldEntity {
     11class TurretPowerUp : public PowerUp {
    1212
    1313 public:
    14   PowerUp ();
    15   virtual ~PowerUp ();
     14  TurretPowerUp();
     15  TurretPowerUp(const TiXmlElement* root);
     16  virtual ~TurretPowerUp ();
    1617
     18  private:
     19   void init();
     20   void loadParams(const TiXmlElement* root);
    1721};
    1822
    19 #endif /* _POWER_UP_H */
     23#endif /* _TURRET_POWER_UP_H */
Note: See TracChangeset for help on using the changeset viewer.