Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 8502 was 8502, checked in by dafrick, 13 years ago

Minor changes.

File size: 2.4 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Sandro Sgier
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29/**
30    @file ShrinkPickup.h
31    @brief Declaration of the ShrinkPickup class.
32    @ingroup PickupItems
33*/
34
35
36#ifndef _ShrinkPickup_H__
37#define _ShrinkPickup_H__
38
39#include "pickup/PickupPrereqs.h"
40
41#include <string>
42#include <vector>
43
44#include "pickup/Pickup.h"
45#include "tools/interfaces/Tickable.h"
46
47namespace orxonox {
48
49    /**
50        @author
51        Sandro Sgier
52
53    @ingroup PickupItems
54    */
55    class _PickupExport ShrinkPickup : public Pickup, public Tickable
56    {
57        public:
58            ShrinkPickup(BaseObject* creator); //!< Constructor.
59            virtual ~ShrinkPickup(); //!< Destructor.
60            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
61                        virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
62                        void tick(float dt);
63
64        private:
65            void initialize(void);
66                       
67                        float duration_;                        //!< determines how long the pickup will be active
68                float shrinkFactor_;            //shrink factor of the space ship
69                        float shrinkSpeed_;
70                        bool isActive_;
71                        bool isTerminating_;
72                        int size_;
73                        std::list<SmartPtr<CameraPosition> > cameraPositions_;
74                        float defaultCameraPos_;
75                        Ogre::Vector3 defaultScale_;
76                        Ogre::Vector3 actualScale_;
77                        Ogre::Vector3 smallScale_;
78                        float defaultMass_;
79                        float actualMass_;
80                        float smallMass_;                       
81                        Pawn* carrierToPawnHelper(void);
82                        Pawn* pawn;
83                        Timer durationTimer;
84                        void terminate(void);
85
86    };
87}
88
89#endif
Note: See TracBrowser for help on using the repository browser.