Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 6, 2011, 11:06:45 PM (13 years ago)
Author:
anbueche
Message:

First steps to use of Triggers and Events

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/portals/src/orxonox/worldentities/PortalEndPoint.h

    r8177 r8198  
    88#include "StaticEntity.h"
    99#include "graphics/Billboard.h"
    10 #include "objects/triggers/DistanceMultiTrigger.h"
    11 #include "tools/interfaces/Tickable.h"
     10#include "../../modules/objects/triggers/DistanceMultiTrigger.h"
    1211
    1312namespace orxonox
    1413{
    15     class _OrxonoxExport PortalEndPoint : public StaticEntity
     14    class _OrxonoxExport PortalEndPoint : public DistanceMultiTrigger
    1615    {
    1716        public:
     
    2019            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    2120            //virtual void tick(float dt);
    22             static std::map<unsigned int, PortalEndPoint *> idMap_s;
     21            static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< maps integer id values to portalendpoints
    2322            inline void setID(unsigned int id)
    2423            {
     
    3029                return this->id_;
    3130            }
     31            void jumpOut(WorldEntity * entity); //!< relocate an entity to the position of the endpoint and add it to the set of recentlyPortedOut entities
     32            void tick(float dt);
     33            bool hasRecentlyJumpedOut(WorldEntity * entity); //!< check if a certain entity recently jumped out of this endpoint
    3234        protected:
    3335        private:
    3436            unsigned int id_;
    35             std::set<WorldEntity *> recentlyJumpedOut_;
    36             std::string material_;
     37            std::set<WorldEntity *> recentlyJumpedOut_; //!< Entities which recently jumped out of this EndPoint, hence they shouldn't be pulled in again if the endpoint is the beginning of a link
    3738            Billboard billboard_;
    38             DistanceMultiTrigger trigger_;
    3939    };
    4040
Note: See TracChangeset for help on using the changeset viewer.