- Timestamp:
- Apr 9, 2014, 9:50:45 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/modularships/src/orxonox/worldentities/pawns/ModularSpaceShip.h
r10019 r10023 48 48 /** 49 49 @brief 50 The ModularSpaceShip is the principal entity through which the player interacts with the game. Its main function is to fly, however many things, such as @ref orxonox::Engine Engines or @ref orxonox::Weapon Weapons, can be attached to it. 50 The SpaceShip is the principal entity through which the player interacts with the game. Its main function is to fly, however many things, such as @ref orxonox::Engine Engines or @ref orxonox::Weapon Weapons, can be attached to it. 51 The ModularSpaceShip is an extension of a @ref orxonox::SpaceShip SpaceShip, which uses @ref orxonox::ShipPart ShipParts to allow entities attached to it to be destroyed individually. 51 52 52 53 There are several parameters that define the behavior of the ModularSpaceShip> … … 56 57 - The <b>lift</b> creates a more natural flight feeling through the addition of a lift force. There are again tow parameters that can be specified. The <b>lift</b> which is the lift force that is applied. And the <b>stallSpeed</b> which is the forward speed after which no more lift is generated. 57 58 58 As mentioned @ref orxonox::Engine Engines can be mounted on the ModularSpaceShip. Here is a (primitive) example of a ModularSpaceShip defined in XML: 59 As mentioned @ref orxonox::Engine Engines can be mounted on the ModularSpaceShip. 60 In order to assign attached entities to a ShipPart, a ShipPart with the same name as the corresponding entity needs to be created in the <parts> tag. 61 Here is a (primitive) example of a ModularSpaceShip defined in XML: 59 62 @code 60 63 <ModularSpaceShip … … 77 80 angularDamping = 0.9999999 78 81 > 82 <attached> 83 <StaticEntity name="wing" . . . /> 84 <StaticEntity name="tail" . . . /> 85 </attached> 86 <parts> 87 <ShipPart name="wing" . . . /> 88 <ShipPart name="tail" . . . /> 89 </parts> 79 90 <engines> 80 91 <Engine /> … … 85 96 86 97 @author 87 Fabian 'x3n' Landau 98 Fabian 'x3n' Landau, Noe Pedrazzini 88 99 */ 89 100 class _OrxonoxExport ModularSpaceShip : public SpaceShip … … 105 116 ShipPart* getShipPart(unsigned int index); 106 117 bool hasShipPart(ShipPart* part) const; 118 void removeShipPart(ShipPart* part); 107 119 108 120 virtual void updatePartAssignment();
Note: See TracChangeset
for help on using the changeset viewer.