Last change
on this file since 8454 was
8243,
checked in by anbueche, 13 years ago
|
portals work pretty good
|
-
Property svn:executable set to
*
|
File size:
1.4 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 | |
---|
20 | virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); |
---|
21 | virtual void tick(float dt); |
---|
22 | inline void setFromID(unsigned int from) |
---|
23 | { |
---|
24 | this->fromID_ = from; |
---|
25 | } |
---|
26 | inline unsigned int getFromID(unsigned int) const |
---|
27 | { |
---|
28 | return this->fromID_; |
---|
29 | } |
---|
30 | inline void setToID(unsigned int to) |
---|
31 | { |
---|
32 | this->toID_ = to; |
---|
33 | } |
---|
34 | inline unsigned int getToID(unsigned int) const |
---|
35 | { |
---|
36 | return this->toID_; |
---|
37 | } |
---|
38 | static void use(MobileEntity * entity, PortalEndPoint * entrance); |
---|
39 | protected: |
---|
40 | private: |
---|
41 | static std::map<PortalEndPoint *, PortalEndPoint *> links_s; |
---|
42 | unsigned int fromID_; |
---|
43 | unsigned int toID_; |
---|
44 | PortalEndPoint* from_; |
---|
45 | PortalEndPoint* to_; |
---|
46 | float activationRadius_; |
---|
47 | bool isNowPortable(WorldEntity * ent); |
---|
48 | }; |
---|
49 | |
---|
50 | } |
---|
51 | |
---|
52 | #endif /* _Portals_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.