Line | |
---|
1 | #ifndef _ShrinkPickup_H__ |
---|
2 | #define _ShrinkPickup_H__ |
---|
3 | |
---|
4 | #include "pickup/PickupPrereqs.h" |
---|
5 | |
---|
6 | #include <string> |
---|
7 | #include <vector> |
---|
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 | void tick(float dt); |
---|
28 | |
---|
29 | private: |
---|
30 | void initialize(void); |
---|
31 | |
---|
32 | float duration_; //!< determines how long the pickup will be active |
---|
33 | float shrinkFactor_; //shrink factor of the space ship |
---|
34 | float shrinkDelay_; //how long it takes to shrink to the final size |
---|
35 | bool isActive_; |
---|
36 | bool isTerminating_; |
---|
37 | int size_; |
---|
38 | std::vector<float> defaultScales_; |
---|
39 | std::vector<float> smallScales_; |
---|
40 | std::vector<float> actualScales_; |
---|
41 | std::vector<Vector3> defaultPositions_; |
---|
42 | std::vector<Vector3> smallPositions_; |
---|
43 | std::vector<Vector3> actualPositions_; |
---|
44 | Pawn* carrierToPawnHelper(void); |
---|
45 | Pawn* pawn; |
---|
46 | Timer durationTimer; |
---|
47 | void terminate(void); |
---|
48 | |
---|
49 | }; |
---|
50 | } |
---|
51 | |
---|
52 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.