Changeset 8628 for code/branches/presentation
- Timestamp:
- May 27, 2011, 10:54:34 PM (14 years ago)
- Location:
- code/branches/presentation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/data/levels/presentationFS11.oxw
r8601 r8628 54 54 55 55 <!-- BOUNDARIES AND PORTALS --> 56 57 56 58 57 <Template name=PortalDefault> … … 64 63 </Template> 65 64 66 <PortalEndPoint position="350,0,0" id="1" distance="40" target="MobileEntity" design="PortalDefault"/> 67 <PortalEndPoint position="-30300,0,0" id="2" distance="40" target="MobileEntity" design="PortalDefault"/> 65 <SpaceBoundaries warnDistance="1" maxDistance="400" showDistance="300" healthDecrease="0.1" position="-90000,0,0"/> 66 <PortalEndPoint position="-350,0,0" id="3" distance="40" target="MobileEntity" design="PortalDefault"/> 67 <PortalEndPoint position="-72000,0,0" id="4" distance="40" target="MobileEntity" design="PortalDefault"/> 68 <SpaceBoundaries warnDistance="1" maxDistance="400" showDistance="300" healthDecrease="0.1" position="0,10000,0"/> 68 69 69 70 <SpaceBoundaries warnDistance="1" maxDistance="450" showDistance="300" healthDecrease="0.1" position="0,0,0"/> 70 71 <SpaceBoundaries warnDistance="1" maxDistance="400" showDistance="300" healthDecrease="0.1" position="-30000,0,0"/> 71 72 72 <PortalLink fromID=" 1" toID="2" />73 <PortalLink fromID=" 2" toID="1" />73 <PortalLink fromID="3" toID="4" /> 74 <PortalLink fromID="4" toID="3" /> 74 75 75 76 <!-- MODELS, DEBRIS, ETC --> 76 77 77 <!-- hydrogen farmer -->78 <SpaceShip position="0,1750,0" roll=90 mass=10000 >79 <attached>80 <!-- Docking -->81 <DistanceTriggerBeacon name="bcnDestroyer" />82 <DockingTarget name="destroyer" />83 84 <Dock orientation="0.5, 0.5, 0.5, 0.5" position="-1500,0,0" >85 <animations>86 <MoveToDockingTarget target="destroyer" position="-1300,0,0" />87 </animations>88 <effects>89 <DockToShip target="spaceShip" />90 </effects>91 <events>92 <execute>93 <EventListener event="dockMe" />94 </execute>95 </events>96 <attached>97 <DistanceTrigger position="0,0,-200" distance="30" target="Pawn"98 beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"99 />100 <Billboard position="0,0,-200" material="Examples/Flare" colour="1.0, 0, 0" />101 </attached>102 </Dock>103 104 <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=100 />105 <!-- <Model mesh="cube.mesh" mass=10 position="-1120,0,0" scale3D="230,200,490" /> -->106 <!-- <Model mesh="cube.mesh" mass=10 position="580,0,-960" scale3D="230,200,490" yaw=-120 /> -->107 <!-- <Model mesh="cube.mesh" mass=10 position="580,0,960" scale3D="230,200,490" yaw=-240 /> -->108 <!-- <Model mesh="cube.mesh" mass=10 position="0,0,0" scale3D="600,200,100" /> -->109 </attached>110 <collisionShapes>111 <BoxCollisionShape position="-1120,0,0" halfExtents="230,200,490" />112 <BoxCollisionShape position="580,0,-960" halfExtents="230,200,490" yaw=-120 />113 <BoxCollisionShape position="580,0,960" halfExtents="230,200,490" yaw=-240 />114 </collisionShapes>115 </SpaceShip>116 117 <SpaceShip template="spaceshipassff2" position="0,3500,0" >118 <attached>119 <DockingTarget name="spaceShip" />120 </attached>121 122 </SpaceShip>123 124 125 78 <!-- This is a model of Earth: mass=EarthMass/1000 and radius=EarthRadius[km]*10 --> 126 79 <Planet 127 position=" 70500,0,0"80 position="80500,0,0" 128 81 scale="63000" 129 82 collisionType="dynamic" … … 150 103 </Planet> 151 104 105 <!-- MOON AREA --> 106 152 107 <!-- This is a model of our Moon: mass=MoonMass/1000 and radius=MoonRadius[km]*10 and position=DistanceFromEarth[km]*10 --> 153 108 <Planet 154 position="- 15000,0,0"109 position="-80000,0,0" 155 110 scale="4000" 156 111 collisionType="dynamic" … … 176 131 </Planet> 177 132 133 <!-- Hydrogen farmer --> 134 <SpaceShip position="-74000,2500,0" roll=90 yaw=180 pitch=20 mass=10000 > 135 <attached> 136 <!-- Docking --> 137 <DistanceTriggerBeacon name="bcnDestroyer" /> 138 <DockingTarget name="destroyer" /> 139 140 <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=100 /> 141 <!-- <Model mesh="cube.mesh" mass=10 position="-1120,0,0" scale3D="230,200,490" /> --> 142 <!-- <Model mesh="cube.mesh" mass=10 position="580,0,-960" scale3D="230,200,490" yaw=-120 /> --> 143 <!-- <Model mesh="cube.mesh" mass=10 position="580,0,960" scale3D="230,200,490" yaw=-240 /> --> 144 <!-- <Model mesh="cube.mesh" mass=10 position="0,0,0" scale3D="600,200,100" /> --> 145 </attached> 146 <collisionShapes> 147 <BoxCollisionShape position="-1120,0,0" halfExtents="230,200,490" /> 148 <BoxCollisionShape position="580,0,-960" halfExtents="230,200,490" yaw=-120 /> 149 <BoxCollisionShape position="580,0,960" halfExtents="230,200,490" yaw=-240 /> 150 </collisionShapes> 151 </SpaceShip> 152 153 <Dock position="-73942, 1288, -255" roll=90 yaw=180 > 154 <animations> 155 <MoveToDockingTarget target="destroyer" /> 156 </animations> 157 <effects> 158 <DockToShip target="spaceShip" /> 159 </effects> 160 <events> 161 <execute> 162 <EventListener event="dockMe" /> 163 </execute> 164 </events> 165 <attached> 166 <DistanceTrigger position="10,-202, -42" distance="400" target="Pawn" 167 beaconMode="exclude" targetname="bcnDestroyer" name="dockMe" 168 /> 169 <Billboard position="10,-202,-42" material="Examples/Flare" colour="1.0, 0, 0" /> 170 </attached> 171 </Dock> 172 173 <SpaceShip template="spaceshipassff2" position="-73915,3786,67" orientation="-0.14045, 0.68254, 0.68144, 0.223774" > 174 <attached> 175 <DockingTarget name="spaceShip" /> 176 </attached> 177 </SpaceShip> 178 178 179 179 180 <PickupSpawner position="-25,-50,-125" respawnTime="10" triggerDistance="20" maxSpawnedItems="5"> -
code/branches/presentation/src/modules/portals/PortalEndPoint.cc
r8605 r8628 42 42 std::map<unsigned int, PortalEndPoint *> PortalEndPoint::idMap_s; 43 43 44 PortalEndPoint::PortalEndPoint(BaseObject* creator) : StaticEntity(creator), id_(0), trigger_(NULL), reenterDelay_(0)44 PortalEndPoint::PortalEndPoint(BaseObject* creator) : StaticEntity(creator), RadarViewable(creator, static_cast<WorldEntity*>(this)), id_(0), trigger_(NULL), reenterDelay_(0) 45 45 { 46 46 RegisterObject(PortalEndPoint); … … 49 49 this->trigger_->setName("portal"); 50 50 this->attach(trigger_); 51 52 this->setRadarObjectColour(ColourValue::White); 53 this->setRadarObjectShape(RadarViewable::Dot); 54 this->setRadarVisibility(true); 51 55 } 52 56 … … 117 121 } 118 122 123 void PortalEndPoint::changedActivity(void) 124 { 125 SUPER(PortalEndPoint, changedActivity); 126 127 this->setRadarVisibility(this->isActive()); 128 } 129 119 130 bool PortalEndPoint::letsEnter(MobileEntity* entity) 120 131 { -
code/branches/presentation/src/modules/portals/PortalEndPoint.h
r8605 r8628 43 43 44 44 #include "worldentities/StaticEntity.h" 45 #include "interfaces/RadarViewable.h" 45 46 #include "graphics/Billboard.h" 46 47 #include "objects/triggers/DistanceMultiTrigger.h" … … 57 58 */ 58 59 59 class _PortalsExport PortalEndPoint : public StaticEntity 60 class _PortalsExport PortalEndPoint : public StaticEntity, public RadarViewable 60 61 { 61 62 public: 62 63 PortalEndPoint(BaseObject* creator); 63 64 virtual ~PortalEndPoint(); 65 64 66 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 67 virtual void changedActivity(void); 68 65 69 inline void setTarget(const std::string & target) //!< add types which are allowed to activate the PortalEndPoint 66 { 67 this->trigger_->addTarget(target); 68 } 70 { this->trigger_->addTarget(target); } 69 71 70 72 void XMLEventPort(Element& xmlelement, XMLPort::Mode mode); 71 73 static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< Maps the id of each PortalEndPoint to a pointer to that PortalEndPoint 72 74 inline void setReenterDelay(unsigned int seconds) 73 { 74 this->reenterDelay_ = seconds; 75 } 75 { this->reenterDelay_ = seconds; } 76 76 inline unsigned int getReenterDelay() 77 { 78 return this->reenterDelay_; 79 } 77 { return this->reenterDelay_; } 80 78 inline void setID(unsigned int id) 81 { 82 this->id_ = id; 83 } 79 { this->id_ = id; } 84 80 85 81 inline unsigned int getID() const 86 { 87 return this->id_; 88 } 82 { return this->id_; } 89 83 90 84 /// \brief Set templateName_ (the name of the design Template) and add that Template to this Object 91 85 inline void setTemplate(const std::string & name) 92 { 93 this->templateName_ = name; 94 this->addTemplate(name); 95 } 86 { this->templateName_ = name; this->addTemplate(name); } 96 87 97 88 /// \brief Get the name of the attached design template 98 89 inline const std::string & getTemplate() 99 { 100 return this->templateName_; 101 } 90 { return this->templateName_; } 102 91 103 92 /*! \brief This function is called each time the DistanceMultiTrigger of this PortalEndPoint changed
Note: See TracChangeset
for help on using the changeset viewer.