Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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/orxonox/interfaces
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • 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.
Note: See TracChangeset for help on using the changeset viewer.