Changeset 9789 for code/branches/spacestationentry
- Timestamp:
- Nov 18, 2013, 4:05:55 PM (11 years ago)
- Location:
- code/branches/spacestationentry
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/spacestationentry/data/levels/dockingToASpaceStation.oxw
r9776 r9789 83 83 <EventListener event="dockMe" /> 84 84 </execute> 85 85 86 <activity> 86 87 <EventListener event=notGameEnd /> … … 88 89 </events> 89 90 <attached> 90 <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 /> 91 <BlinkingBillboard position="10,0,0" material="Examples/Flare" colour="1, 0.3, 1, 0.1" amplitude=0.2 frequency=0.4 phase=0 quadratic=1 /> 92 <BlinkingBillboard position="20,0,0" material="Examples/Flare" colour="1, 0.3, 1, 0.1" amplitude=0.2 frequency=0.4 phase=0 quadratic=1 /> 93 <BlinkingBillboard position="30,0,0" material="Examples/Flare" colour="1, 0.3, 1, 0.1" amplitude=0.2 frequency=0.4 phase=0 quadratic=1 /> 94 <BlinkingBillboard position="0,10,0" material="Examples/Flare" colour="0.3, 1, 1, 0.1" amplitude=0.2 frequency=0.4 phase=0 quadratic=1 /> 95 <BlinkingBillboard position="0,20,0" material="Examples/Flare" colour="0.3, 1, 1, 0.1" amplitude=0.2 frequency=0.4 phase=0 quadratic=1 /> 96 <BlinkingBillboard position="0,30,0" material="Examples/Flare" colour="0.3, 1, 1, 0.1" amplitude=0.2 frequency=0.4 phase=0 quadratic=1 /> 97 <BlinkingBillboard position="0,0,10" material="Examples/Flare" colour="0.3, 0.3, 1, 1" amplitude=0.2 frequency=0.4 phase=0 quadratic=1 /> 98 <BlinkingBillboard position="0,0,20" material="Examples/Flare" colour="0.3, 0.3, 1, 1" amplitude=0.2 frequency=0.4 phase=0 quadratic=1 /> 99 <BlinkingBillboard position="0,0,30" material="Examples/Flare" colour="0.3, 0.3, 1, 1" amplitude=0.2 frequency=0.4 phase=0 quadratic=1 /> 91 <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 /> 100 92 <DistanceTrigger position="0,0,0" distance="200" target="Pawn" 101 93 beaconMode="exclude" targetname="bcnDestroyer" name="dockMe" … … 105 97 </Dock> 106 98 99 <!-- Docking (Ausdocken)--> 100 <Dock position="100,-1950,100" roll=0 yaw=0 > 101 <animations> 102 <MoveToDockingTarget target="spaceShip" /> 103 </animations> 104 <effects> 105 <DockToShip target="destroyer" /> 106 </effects> 107 <events> 108 <execute> 109 <EventListener event="undockMe" /> 110 </execute> 111 112 <activity> 113 <EventListener event=notGameEnd /> 114 </activity> 115 </events> 116 <attached> 117 <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 /> 118 <DistanceTrigger position="0,0,0" distance="5" target="Pawn" 119 beaconMode="exclude" targetname="bcnDestroyer" name="undockMe" 120 /> 121 </attached> 122 123 </Dock> 124 125 107 126 108 127 … … 145 164 <!-- Schwerkraftfeld --> 146 165 147 <ForceField position="2500,-92000,2500" mode="sphere" diameter="18 2000" velocity="-5000" />148 <ForceField position="2500,-92000,-2500" mode="sphere" diameter="18 2000" velocity="-5000" />149 <ForceField position="-2500,-92000,2500" mode="sphere" diameter="18 2000" velocity="-5000" />150 <ForceField position="-2500,-92000,-2500" mode="sphere" diameter="18 2000" velocity="-5000" />151 152 <!-- Ausgang -->153 154 <StaticEntity position="1 20,-1950,120" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >166 <ForceField position="2500,-92000,2500" mode="sphere" diameter="184000" velocity="-5000" /> 167 <ForceField position="2500,-92000,-2500" mode="sphere" diameter="184000" velocity="-5000" /> 168 <ForceField position="-2500,-92000,2500" mode="sphere" diameter="184000" velocity="-5000" /> 169 <ForceField position="-2500,-92000,-2500" mode="sphere" diameter="184000" velocity="-5000" /> 170 171 <!-- Ausgang Trigger Falsch 172 173 <StaticEntity position="100,-1950,100" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 > 155 174 <attached> 156 175 <Model position="0,0,0" mesh="cube.mesh" scale3D="4,4,4" /> … … 161 180 </StaticEntity> 162 181 163 <DistanceTrigger name="ausgang" position="1 20,-1950,120" target="Pawn" distance=50 stayActive="false" delay=0 />182 <DistanceTrigger name="ausgang" position="100,-1950,100" target="Pawn" distance=50 stayActive="false" delay=0 /> 164 183 <Script code="undock" onLoad="false"> 165 184 <events> … … 169 188 </events> 170 189 </Script> 190 --> 171 191 172 192 -
code/branches/spacestationentry/src/modules/docking/Dock.cc
r9667 r9789 69 69 XMLPortObject(Dock, DockingAnimation, "animations", addAnimation, getAnimation, xmlelement, mode); 70 70 XMLPortEventSink(Dock, BaseObject, "execute", execute, xmlelement, mode); 71 71 72 } 72 73 … … 76 77 77 78 XMLPortEventSink(Dock, BaseObject, "execute", execute, xmlelement, mode); 79 80 // XMLPortEventSink(Dock, BaseObject, "execute2", execute2, xmlelement, mode); 78 81 } 79 82 … … 120 123 } 121 124 125 /*bool Dock::execute2(bool bTriggered, BaseObject* trigger) 126 { 127 orxout(user_warning)<<"execute2"<<endl; 128 PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger); 129 PlayerInfo* player = NULL; 130 131 // Check whether it is a player trigger and extract pawn from it 132 if(pTrigger != NULL) 133 { 134 if(!pTrigger->isForPlayer()) { // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one. 135 orxout(verbose, context::docking) << "Docking:execute PlayerTrigger was not triggered by a player.." << endl; 136 return false; 137 } 138 player = pTrigger->getTriggeringPlayer(); 139 } 140 else 141 { 142 orxout(verbose, context::docking) << "Docking::execute Not a player trigger, can't extract pawn from it.." << endl; 143 return false; 144 } 145 if(player == NULL) 146 { 147 orxout(verbose, context::docking) << "Docking::execute Can't retrieve PlayerInfo from Trigger. (" << trigger->getIdentifier()->getName() << ")" << endl; 148 return false; 149 } 150 151 if(bTriggered) 152 { 153 // Add player to this Docks candidates 154 docked_.insert(player); 155 156 // Show docking dialog 157 this->showDockingDialogHelper(player); 158 } 159 else 160 { 161 // Remove player from candidates list 162 docked_.erase(player); 163 } 164 165 return true; 166 } 167 168 */ 122 169 void Dock::showDockingDialogHelper(PlayerInfo* player) 123 170 { … … 177 224 if (animations_.empty()) 178 225 return dockingAnimationFinished(player); 226 179 227 else 180 228 DockingAnimation::invokeAnimation(true, player, animations_); -
code/branches/spacestationentry/src/modules/docking/Dock.h
r9667 r9789 62 62 // Trigger interface 63 63 bool execute(bool bTriggered, BaseObject* trigger); 64 // bool execute2(bool bTriggered, BaseObject* trigger); 64 65 65 66 // XML interface
Note: See TracChangeset
for help on using the changeset viewer.