Last change
on this file since 8381 was
8381,
checked in by ssgier, 13 years ago
|
started creating a more efficient code structure
|
File size:
1.3 KB
|
Rev | Line | |
---|
[8375] | 1 | #ifndef _ShrinkPickup_H__ |
---|
| 2 | #define _ShrinkPickup_H__ |
---|
| 3 | |
---|
| 4 | #include "pickup/PickupPrereqs.h" |
---|
| 5 | |
---|
| 6 | #include <string> |
---|
[8381] | 7 | #include <vector> |
---|
[8375] | 8 | |
---|
| 9 | #include "pickup/Pickup.h" |
---|
| 10 | #include "tools/interfaces/Tickable.h" |
---|
| 11 | |
---|
| 12 | namespace orxonox { |
---|
| 13 | |
---|
| 14 | /** |
---|
| 15 | @author |
---|
| 16 | Sandro Sgier |
---|
| 17 | |
---|
| 18 | @ingroup PickupItems |
---|
| 19 | */ |
---|
| 20 | class _PickupExport ShrinkPickup : public Pickup, public Tickable |
---|
| 21 | { |
---|
| 22 | public: |
---|
| 23 | ShrinkPickup(BaseObject* creator); //!< Constructor. |
---|
| 24 | virtual ~ShrinkPickup(); //!< Destructor. |
---|
| 25 | virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around. |
---|
| 26 | virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass. |
---|
| 27 | |
---|
| 28 | private: |
---|
| 29 | void initialize(void); |
---|
[8381] | 30 | const float duration; //determines how long the pickup will be active |
---|
| 31 | const float shrinkFactor; //shrink factor of the space ship |
---|
| 32 | const float shrinkDelay; //how long it takes to shrink to the final size |
---|
| 33 | double factorPerCall; |
---|
| 34 | bool isTerminating; |
---|
| 35 | vector<float> defaultScales; |
---|
| 36 | vector<float> smallScales; |
---|
| 37 | vector<float> actualScales; |
---|
| 38 | vector<float> defaultPositions; |
---|
| 39 | vector<float> smallPositions; |
---|
| 40 | vector<float> actualPositions; |
---|
| 41 | Pawn* carrierToPawnHelper(void); |
---|
[8375] | 42 | Pawn* pawn; |
---|
| 43 | Timer durationTimer; |
---|
| 44 | void terminate(void); |
---|
| 45 | |
---|
| 46 | |
---|
| 47 | }; |
---|
| 48 | } |
---|
| 49 | |
---|
[8381] | 50 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.