Last change
on this file since 8499 was
8457,
checked in by FelixSchulthess, 14 years ago
|
merged portals branch into trunk
|
-
Property svn:executable set to
*
|
File size:
1.6 KB
|
Line | |
---|
1 | #ifndef _PortalLink_H__ |
---|
2 | #define _PortalLink_H__ |
---|
3 | |
---|
4 | #include "portals/PortalsPrereqs.h" |
---|
5 | #include "tools/interfaces/Tickable.h" |
---|
6 | #include "core/BaseObject.h" |
---|
7 | #include "PortalEndPoint.h" |
---|
8 | #include "objects/eventsystem/EventListener.h" |
---|
9 | |
---|
10 | #include <map> |
---|
11 | |
---|
12 | namespace orxonox |
---|
13 | { |
---|
14 | class _PortalsExport PortalLink : public BaseObject |
---|
15 | { |
---|
16 | public: |
---|
17 | PortalLink(BaseObject* creator); |
---|
18 | virtual ~PortalLink(); |
---|
19 | virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); |
---|
20 | inline void setFromID(unsigned int from) //!< set the ID of the PortalEndPoint which should act as the entrance of this link |
---|
21 | { |
---|
22 | this->fromID_ = from; |
---|
23 | } |
---|
24 | inline unsigned int getFromID(unsigned int) const |
---|
25 | { |
---|
26 | return this->fromID_; |
---|
27 | } |
---|
28 | inline void setToID(unsigned int to) //!< set the ID of the PortalEndPoint which should act as the exit of this link |
---|
29 | { |
---|
30 | this->toID_ = to; |
---|
31 | } |
---|
32 | inline unsigned int getToID(unsigned int) const |
---|
33 | { |
---|
34 | return this->toID_; |
---|
35 | } |
---|
36 | static void use(MobileEntity * entity, PortalEndPoint * entrance); // |
---|
37 | protected: |
---|
38 | private: |
---|
39 | static std::map<PortalEndPoint *, PortalEndPoint *> links_s; |
---|
40 | unsigned int fromID_; |
---|
41 | unsigned int toID_; |
---|
42 | PortalEndPoint* from_; |
---|
43 | PortalEndPoint* to_; |
---|
44 | float activationRadius_; |
---|
45 | bool isNowPortable(WorldEntity * ent); |
---|
46 | }; |
---|
47 | |
---|
48 | } |
---|
49 | |
---|
50 | #endif /* _Portals_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.