Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/pickup/src/modules/pickup/items/ShrinkPickup.h @ 8433

Last change on this file since 8433 was 8433, checked in by ssgier, 13 years ago

working on continuous shrinking

File size: 1.4 KB
RevLine 
[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
12namespace 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.
[8433]27                        void tick(float dt);
[8375]28
29        private:
30            void initialize(void);
[8433]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_;
[8381]44                        Pawn* carrierToPawnHelper(void);
[8375]45                        Pawn* pawn;
46                        Timer durationTimer;
47                        void terminate(void);
48
49    };
50}
51
[8381]52#endif
Note: See TracBrowser for help on using the repository browser.