Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 13, 2014, 11:45:47 AM (11 years ago)
Author:
noep
Message:

Fixed yet another segfault (which we hadn't seen yet).
Cleared emptyLevel, created two testlevels (testing with boxes)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/modularships/src/orxonox/items/PartDestructionEvent.h

    r10052 r10053  
    4444        public:
    4545
     46            enum TargetParam
     47            {
     48                shieldhealth,
     49                maxshieldhealth,
     50                shieldabsorption,
     51                shieldrechargerate,
     52                null
     53            };
     54
    4655            PartDestructionEvent(Context* context);
    4756            virtual ~PartDestructionEvent();
     
    5059
    5160            void execute();
     61
     62            inline void setValid(bool valid)
     63                { this->valid_ = valid; }
     64            inline bool isValid()
     65                { return this->valid_; }
     66
     67            void setParent(ShipPart* parent);
     68            inline ShipPart* getParent()
     69                { return this->parent_; }
    5270
    5371            void setTargetType(std::string type);
     
    6785                { return this->operation_; }
    6886
     87            float operate(float input);
     88
    6989            void setEventValue(float value);
    7090            inline float getEventValue()
     
    7595        private:
    7696
    77             bool isValid_;
     97            ShipPart* parent_;
     98            bool valid_;
    7899
    79100            std::string targetType_;
    80101            std::string targetName_;
    81             std::string targetParam_;
     102            TargetParam targetParam_;
    82103            std::string operation_;
    83104
Note: See TracChangeset for help on using the changeset viewer.