Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2009, 5:42:50 PM (15 years ago)
Author:
landauf
Message:

Cleaned up setPlayer/removePlayer interface between PlayerInfo and ControllableEntity. The whole control is now up to the PlayerInfo, the respective functions in ControllableEntity are now protected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/worldentities/ControllableEntity.h

    r2973 r3038  
    3939    class _OrxonoxExport ControllableEntity : public MobileEntity
    4040    {
     41        friend class PlayerInfo; // PlayerInfo uses setPlayer and removePlayer
     42
    4143        public:
    4244            ControllableEntity(BaseObject* creator);
     
    5052            virtual void changedPlayer() {}
    5153
    52             virtual void setPlayer(PlayerInfo* player);
    53             virtual void removePlayer();
    5454            inline PlayerInfo* getPlayer() const
    5555                { return this->player_; }
     
    131131
    132132        protected:
     133            virtual void setPlayer(PlayerInfo* player); // don't call this directly, use friend class PlayerInfo instead
     134            virtual void removePlayer();                // don't call this directly, use friend class PlayerInfo instead
     135
    133136            virtual void startLocalHumanControl();
    134137            virtual void stopLocalHumanControl();
Note: See TracChangeset for help on using the changeset viewer.