Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 14, 2008, 1:42:17 AM (15 years ago)
Author:
rgrieder
Message:
  • updated msvc files
  • Fixed build by including util/Integer.h in NetworkPrereqs.h instead of util/Math.h
  • Fixed issue with a this pointer used in the base class c'tor initialisation
  • Fixed build under windows: INFINITE seems to be a macro, defined in winbase.h. Constant was somewhere in the quest files.
  • Fixed build: Only integral types can have header-file value when declared as static const. Float is not supported by the standard.
  • Fixed a potential bug in Planet.cc: "if (cond) doOne; doTwo" —> missing brances (indentation was correct, so I assume there have to be brances)
  • Corrected lots of indentation problems with tabs/spaces mix.
  • Changed all "@file Blubb.h" to "@file": Doxygen then assumes the actual filename. This gives more flexibility.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h

    r2262 r2435  
    2828
    2929/**
    30     @file PlayerTrigger.h
     30    @file
    3131    @brief
    32         Definition of the PlayerTrigger class.
     32    Definition of the PlayerTrigger class.
    3333*/
    3434
     
    4040#include "Trigger.h"
    4141
    42 namespace orxonox {
    43    
     42namespace orxonox
     43{
    4444    /**
    4545    @brief
     
    5050    class _OrxonoxExport PlayerTrigger : public Trigger
    5151    {
    52         public:
    53             PlayerTrigger(BaseObject* creator);
    54             virtual ~PlayerTrigger();
    55            
    56             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a PlayerTrigger object through XML.
     52    public:
     53        PlayerTrigger(BaseObject* creator);
     54        virtual ~PlayerTrigger();
     55       
     56        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a PlayerTrigger object through XML.
     57       
     58        /**
     59        @brief Returns the player that triggered the PlayerTrigger.
     60        @return Returns a pointer to the ControllableEntity that triggered the PlayerTrigger.
     61        */
     62        inline ControllableEntity* getTriggeringPlayer(void) const
     63            { return this->player_; }
     64       
     65        /**
     66        @brief Checks whether the PlayerTrigger normally returns a ControllableEntity.
     67        @return Returns true if the PlayerTrigger normally returns a ControllableEntity.
     68        */
     69        inline bool isForPlayer(void) const
     70           { return this->isForPlayer_; }
    5771           
    58             /**
    59             @brief Returns the player that triggered the PlayerTrigger.
    60             @return Returns a pointer to the ControllableEntity that triggered the PlayerTrigger.
    61             */
    62             inline ControllableEntity* getTriggeringPlayer(void) const
    63                 { return this->player_; }
    64            
    65             /**
    66             @brief Checks whether the PlayerTrigger normally returns a ControllableEntity.
    67             @return Returns true if the PlayerTrigger normally returns a ControllableEntity.
    68             */
    69             inline bool isForPlayer(void) const
    70                { return this->isForPlayer_; }
    71            
    72         protected:
    73             virtual bool isTriggered(TriggerMode mode) = 0;
    74            
    75             /**
    76             @brief Set the player that triggered the PlayerTrigger. This is normally done by classes inheriting vom PlayerTrigger.
    77             @param player A pointer to the ControllableEntity that triggered the PlayerTrigger.
    78             */
    79             inline void setTriggeringPlayer(ControllableEntity* player)
    80                { this->player_ = player; }
     72    protected:
     73        virtual bool isTriggered(TriggerMode mode) = 0;
     74       
     75        /**
     76        @brief Set the player that triggered the PlayerTrigger. This is normally done by classes inheriting vom PlayerTrigger.
     77        @param player A pointer to the ControllableEntity that triggered the PlayerTrigger.
     78        */
     79        inline void setTriggeringPlayer(ControllableEntity* player)
     80           { this->player_ = player; }
    8181
    8282            /**
     
    8484            @param isForPlayer Should be true when the PlayerTrigger schould be set to normally be triggered by ControllableEntities, false if not.
    8585            */
    86             inline void setForPlayer(bool isForPlayer)
    87                { this->isForPlayer_ = isForPlayer; }
    88            
    89         private:
    90             ControllableEntity* player_; //!< The player that triggered the PlayerTrigger.
    91             bool isForPlayer_; //!< Is true when the PlayerTrigger schould be set to normally be triggered by ControllableEntities.
    92        
     86        inline void setForPlayer(bool isForPlayer)
     87           { this->isForPlayer_ = isForPlayer; }
     88       
     89    private:
     90        ControllableEntity* player_; //!< The player that triggered the PlayerTrigger.
     91        bool isForPlayer_; //!< Is true when the PlayerTrigger schould be set to normally be triggered by ControllableEntities.
     92   
    9393    };
    9494
Note: See TracChangeset for help on using the changeset viewer.