Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5875 in orxonox.OLD for branches/spaceshipcontrol/src/world_entities


Ignore:
Timestamp:
Dec 2, 2005, 3:33:46 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/spaceshipcontrol: compiles again

Location:
branches/spaceshipcontrol/src/world_entities
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/spaceshipcontrol/src/world_entities/playable.cc

    r5872 r5875  
    1414*/
    1515
    16 #include "weapon_manager.h"
     16#include "weapons/weapon_manager.h"
    1717#include "playable.h"
     18#include "event_handler.h"
     19#include "player.h"
    1820
    1921
     
    2325}
    2426
    25 Playable::init()
     27Playable::~Playable()
     28{
     29
     30}
     31
     32void Playable::init()
    2633{
    2734  this->setClassID(CL_PLAYABLE, "Playable");
     
    3643{
    3744  /*EventHandler*/
    38   evh = EventHandler::getInstance();
     45  EventHandler* evh = EventHandler::getInstance();
    3946  for (int i = 0 ; i < events.size(); i++)
    4047  {
    41   if (!evh->isSubscribed(ES_GAME, i))
    42   evh->subscribe(this, ES_GAME, i);
    43 }
     48    if (!evh->isSubscribed(ES_GAME, i))
     49      evh->subscribe(player, ES_GAME, i);
     50  }
    4451
    4552}
    46 
    47 Playable::getWeaponManager()
    48 {
    49   return weaponMan;
    50 }
  • branches/spaceshipcontrol/src/world_entities/playable.h

    r5872 r5875  
    2121class Playable : public WorldEntity
    2222{
    23 
    2423  public:
    2524    Playable();
     
    2928    void loadParams(const TiXmlElement* root);
    3029
    31     virtual void addWeapon(Weapon* weapon )= 0;
    32     virtual void removeWeapon(Weapon* weapon) = 0;
    33     WeaponManager* getWeaponManager();
     30    virtual void addWeapon(Weapon* weapon )  {}//= 0;
     31    virtual void removeWeapon(Weapon* weapon) {}//= 0;
     32    inline WeaponManager* getWeaponManager() const { return this->weaponMan; };
    3433
    3534    void subscribeEvents(Player* player);
    36     virtual void process(const Event &event) = 0;
    37     virtual void setKeySet();
     35    virtual void process(const Event &event) {} //= 0;
     36    virtual void setKeySet() {};
    3837    inline const std::list<Event*>& getEventList() { return this->events; };
    3938
  • branches/spaceshipcontrol/src/world_entities/player.cc

    r5872 r5875  
    1616#include "player.h"
    1717
    18 #include "factory.h"
    19 
    20 #include "list.h"
    21 
    2218#include "event_handler.h"
    23 
    2419#include "event.h"
    2520
Note: See TracChangeset for help on using the changeset viewer.