Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 23, 2011, 2:37:08 PM (13 years ago)
Author:
ssgier
Message:

finished code for ShrinkPickup, adapted XML file\

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup/src/modules/pickup/items/ShrinkPickup.h

    r8502 r8534  
    5959            virtual ~ShrinkPickup(); //!< Destructor.
    6060            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);
     61            virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
     62            virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode);
     63            inline float getShrinkFactor(void) const
     64                { return this->shrinkFactor_; }
     65            inline float getDuration(void) const
     66                { return this->duration_; }
     67            inline float getShrinkSpeed(void) const
     68                { return this->shrinkSpeed_; }
     69            void setShrinkFactor(float factor);
     70            void setDuration(float duration);
     71            void setShrinkSpeed(float speed);
     72            void tick(float dt);
     73
     74        protected:
     75            void initializeIdentifier(void);
    6376
    6477        private:
    6578            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 
     79            float duration_;                    //!< determines how long the pickup will be active
     80            float shrinkFactor_;        //shrink factor of the space ship
     81            float shrinkSpeed_;         //speed of shrinking
     82            bool isActive_;             //true if ship is shrinking or small
     83            bool isTerminating_;        //true if ship is growing
     84            int size_;                  //number of camera positions
     85            std::list<SmartPtr<CameraPosition> > cameraPositions_;
     86            float defaultCameraPos_;    //all default, actual and small values...
     87            Ogre::Vector3 defaultScale_;
     88            Ogre::Vector3 actualScale_;
     89            Ogre::Vector3 smallScale_;
     90            float defaultMass_;
     91            float actualMass_;
     92            float smallMass_;                   
     93            Pawn* carrierToPawnHelper(void);
     94            Pawn* pawn;
     95            Timer durationTimer;
     96            void terminate(void);
    8697    };
    8798}
Note: See TracChangeset for help on using the changeset viewer.