Changeset 7552 for code/trunk/doc/api
- Timestamp:
- Oct 17, 2010, 10:50:43 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/doc/api/Groups.dox
r7551 r7552 333 333 For a new @ref orxonox::Pickupable "Pickupable" you need to create a new class in <code>>modules/pickup/items</code>. Your class needs to be derived from another pickup class, normally this would either be @ref orxonox::Pickupable "Pickupable", @ref orxonox::CollectiblePickup "CollectiblePickup" or @ref orxonox::Pickup "Pickup". @ref orxonox::Pickupable "Pickupable" is (as mentioned earlier) the base class of all things that can be picked up, thus of all pickups. @ref orxonox::CollectiblePickup "CollectiblePickup" is a (directly) derived class of @ref orxonox::Pickupable "Pickupable" and provides the additional functionality of enabling your pickup to be used in a @ref orxonox::PickupCollection "PickupCollection". However you are probably going to want to derive your class form @ref orxonox::Pickup "Pickup", because it is a @ref orxonox::CollectiblePickup "CollectiblePickup" and provides some useful methods. So have a look at @ref orxonox::Pickup "Pickup". 334 334 Once you have created your new pickup class you have to insert it in the <code>PickupPrereqs.h</code> file in the <code>modules/pickup</code> folder and in the <code>CMakeList.txt</code> file in the <code>modules/pickup/items</code> folder. Also have a look at other pickups to make sure you include all the necessary files in your class. 335 Additionally you have to add your pickup as a friend of the @ref orxonox::PickupCarrier "PickupCarrier" class. To that end open <code>PickupCarrier.h</code> in the <code>orxonox/interfaces</code> folder and add your class under336 @code337 // Forward-declarations.338 @endcode339 and under340 @code341 // Friends342 @endcode343 335 344 336 @subsection ChoosingTheCarriers Coosing the carriers … … 413 405 @defgroup PickupItems Items 414 406 @ingroup Pickup 407 408 The actual pickups can be found here. 415 409 */ 416 410
Note: See TracChangeset
for help on using the changeset viewer.