Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5727


Ignore:
Timestamp:
Aug 31, 2009, 9:18:17 PM (15 years ago)
Author:
landauf
Message:

PlayerTrigger is now an interface instead of a child of Trigger. DistanceTrigger inherits now from Trigger AND PlayerTrigger.

Location:
code/branches/libraries2/src
Files:
1 deleted
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • code/branches/libraries2/src/modules/questsystem/QuestEffectBeacon.cc

    r5720 r5727  
    3838#include "core/EventIncludes.h"
    3939#include "objects/worldentities/pawns/Pawn.h"
    40 #include "objects/worldentities/triggers/PlayerTrigger.h"
     40#include "interfaces/PlayerTrigger.h"
    4141#include "QuestEffect.h"
    4242
  • code/branches/libraries2/src/orxonox/OrxonoxPrereqs.h

    r5725 r5727  
    7474    class NotificationListener;
    7575    class PawnListener;
     76    class PlayerTrigger;
    7677    class RadarListener;
    7778    class RadarViewable;
     
    161162    class DistanceTrigger;
    162163    class EventTrigger;
    163     class PlayerTrigger;
    164164    class CheckPoint;
    165165
  • code/branches/libraries2/src/orxonox/interfaces/InterfaceCompilation.cc

    r5693 r5727  
    3535#include "GametypeMessageListener.h"
    3636#include "PawnListener.h"
     37#include "PlayerTrigger.h"
    3738#include "RadarListener.h"
    3839#include "Rewardable.h"
     
    8485    Rewardable::Rewardable()
    8586    {
    86         RegisterObject(Rewardable);
     87        RegisterRootObject(Rewardable);
    8788    }
    8889
     
    9293    NotificationListener::NotificationListener()
    9394    {
    94         RegisterObject(NotificationListener);
     95        RegisterRootObject(NotificationListener);
     96    }
     97
     98    //----------------------------
     99    // PlayerTrigger
     100    //----------------------------
     101    PlayerTrigger::PlayerTrigger()
     102    {
     103        RegisterRootObject(PlayerTrigger);
     104
     105        this->player_ = NULL;
     106        this->isForPlayer_ = true;
    95107    }
    96108}
  • code/branches/libraries2/src/orxonox/interfaces/PlayerTrigger.h

    r5722 r5727  
    3737
    3838#include "OrxonoxPrereqs.h"
    39 #include "Trigger.h"
     39#include "core/OrxonoxClass.h"
    4040
    4141namespace orxonox
     
    4747        Damian 'Mozork' Frick
    4848    */
    49     class _OrxonoxExport PlayerTrigger : public Trigger
     49    class _OrxonoxExport PlayerTrigger : virtual public OrxonoxClass
    5050    {
    5151    public:
    52         PlayerTrigger(BaseObject* creator);
    53         virtual ~PlayerTrigger();
    54 
    55         virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a PlayerTrigger object through XML.
     52        PlayerTrigger();
     53        virtual ~PlayerTrigger() {}
    5654
    5755        /**
     
    7068
    7169    protected:
    72         virtual bool isTriggered(TriggerMode::Value mode) = 0;
    73 
    7470        /**
    7571        @brief Set the player that triggered the PlayerTrigger. This is normally done by classes inheriting vom PlayerTrigger.
  • code/branches/libraries2/src/orxonox/objects/worldentities/triggers/CMakeLists.txt

    r3033 r5727  
    33  DistanceTrigger.cc
    44  EventTrigger.cc
    5   PlayerTrigger.cc
    65  CheckPoint.cc
    76)
  • code/branches/libraries2/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc

    r5720 r5727  
    3737  CreateFactory(DistanceTrigger);
    3838
    39   DistanceTrigger::DistanceTrigger(BaseObject* creator) : PlayerTrigger(creator)
     39  DistanceTrigger::DistanceTrigger(BaseObject* creator) : Trigger(creator)
    4040  {
    4141    RegisterObject(DistanceTrigger);
  • code/branches/libraries2/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h

    r3280 r5727  
    3434#include <set>
    3535#include "core/ClassTreeMask.h"
    36 #include "PlayerTrigger.h"
     36#include "Trigger.h"
     37#include "interfaces/PlayerTrigger.h"
    3738
    3839namespace orxonox
    3940{
    40   class _OrxonoxExport DistanceTrigger : public PlayerTrigger
     41  class _OrxonoxExport DistanceTrigger : public Trigger, public PlayerTrigger
    4142  {
    4243    public:
     
    6768      std::set<Ogre::Node*> targetSet_;
    6869      float distance_;
    69      
     70
    7071  };
    7172}
Note: See TracChangeset for help on using the changeset viewer.