Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 2, 2005, 3:06:50 PM (20 years ago)
Author:
snellen
Message:

player.cc and player.h updated ( in ../src/world_entities)

File:
1 edited

Legend:

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

    r5853 r5872  
    5656}
    5757
    58 /**
    59  * subscribe to all events the controllable needs
    60  */
    61 void Player::subscribeEvents()
    62 {
    63   /*EventHandler* evh = EventHandler::getInstance();
    64   for (int i = 1; i < SDLK_LAST; i++)
    65    {
    66      if (!evh->isSubscribed(ES_GAME, i))
    67           evh->subscribe(this, ES_GAME, i);
    68    }
    69   */
    70 }
     58
    7159
    7260void Player::process(const Event &event)
     
    7866void Player::setControllable(Playable* controllalble)
    7967 {
    80    //todo get keyset an subscribe to the needed keys
     68
    8169   this->controllable = controllable;
     70   this->controllable->subscribeEvents(this);
     71
    8272 }
    8373
Note: See TracChangeset for help on using the changeset viewer.