1 | #include "PortalEndPoint.h" |
---|
2 | #include "core/XMLPort.h" |
---|
3 | |
---|
4 | namespace orxonox |
---|
5 | { |
---|
6 | CreateFactory(PortalEndPoint); |
---|
7 | |
---|
8 | std::map<unsigned int, PortalEndPoint *> PortalEndPoint::idMap_s; |
---|
9 | |
---|
10 | PortalEndPoint::PortalEndPoint(BaseObject* creator) : StaticEntity(creator), id_(0), material_(""), billboard_(0) |
---|
11 | { |
---|
12 | RegisterObject(PortalEndPoint); |
---|
13 | trigger_.setDistance(10); |
---|
14 | trigger_.setStayActive(true); |
---|
15 | } |
---|
16 | |
---|
17 | PortalEndPoint::~PortalEndPoint() |
---|
18 | { |
---|
19 | |
---|
20 | } |
---|
21 | |
---|
22 | void PortalEndPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode) |
---|
23 | { |
---|
24 | SUPER(PortalEndPoint, XMLPort, xmlelement, mode); |
---|
25 | XMLPortParam(PortalEndPoint, "id", setID, getID, xmlelement, mode); |
---|
26 | XMLPortParamExtern(PortalEndPoint, Billboard, this->billboard_, "material", setMaterial, getMaterial, xmlelement, mode); |
---|
27 | XMLPortParamExtern(PortalEndPoint, Billboard, this->billboard_, "colour", setColour, getColour, xmlelement, mode).defaultValues(ColourValue::White); |
---|
28 | |
---|
29 | if(mode == XMLPort::LoadObject) |
---|
30 | { |
---|
31 | idMap_s[this->id_] = this; |
---|
32 | } |
---|
33 | } |
---|
34 | } |
---|