Last change
on this file since 8198 was
8198,
checked in by anbueche, 13 years ago
|
First steps to use of Triggers and Events
|
-
Property svn:executable set to
*
|
File size:
1.5 KB
|
Line | |
---|
1 | #ifndef _PortalEndPoint_H__ |
---|
2 | #define _PortalEndPoint_H__ |
---|
3 | |
---|
4 | #include <set> |
---|
5 | #include <string> |
---|
6 | #include <map> |
---|
7 | |
---|
8 | #include "StaticEntity.h" |
---|
9 | #include "graphics/Billboard.h" |
---|
10 | #include "../../modules/objects/triggers/DistanceMultiTrigger.h" |
---|
11 | |
---|
12 | namespace orxonox |
---|
13 | { |
---|
14 | class _OrxonoxExport PortalEndPoint : public DistanceMultiTrigger |
---|
15 | { |
---|
16 | public: |
---|
17 | PortalEndPoint(BaseObject* creator); |
---|
18 | virtual ~PortalEndPoint(); |
---|
19 | virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); |
---|
20 | //virtual void tick(float dt); |
---|
21 | static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< maps integer id values to portalendpoints |
---|
22 | inline void setID(unsigned int id) |
---|
23 | { |
---|
24 | this->id_ = id; |
---|
25 | } |
---|
26 | |
---|
27 | inline unsigned int getID() const |
---|
28 | { |
---|
29 | return this->id_; |
---|
30 | } |
---|
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 |
---|
34 | protected: |
---|
35 | private: |
---|
36 | unsigned int id_; |
---|
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 |
---|
38 | Billboard billboard_; |
---|
39 | }; |
---|
40 | |
---|
41 | } |
---|
42 | |
---|
43 | #endif /* _Portals_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.