Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 24, 2008, 1:50:47 AM (16 years ago)
Author:
landauf
Message:

Update your media repository and delete keybindings.ini if you want to use boost (space).

  • Added new class "Engine" to control the speed of a SpaceShip (Engine is an Item, MultiStateEngine is a specialized version of Engine)
  • Added FadingBillboard, a billboard with the ability to fade in and out smoothly when activated/deactivated.
  • Several changes in Backlight, it's now a child of FadingBillboard
  • Some changes concerning local control in ControllableEntity
  • Fixed a bug in WorldEntity caused by different destruction order of attached objects on server and client
  • Added a "MainState" to BaseObject. An object has several states (activity, visibility, …) and one of it can be defined as "MainState" in the XML file. Other objects can change this state without knowing which state it really is (used by MultiStateEngine).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/SpaceShip.h

    r2087 r2254  
    5656
    5757            virtual void fire();
     58            virtual void boost();
    5859
    59             void setMaxSpeed(float value)
    60                 { this->maxSpeed_ = value; }
    61             void setMaxSecondarySpeed(float value)
    62                 { this->maxSecondarySpeed_ = value; }
    6360            void setMaxRotation(const Degree& value)
    6461                { this->maxRotation_ = value; }
    65             void setTransAcc(float value)
    66                 { this->translationAcceleration_ = value; }
    6762            void setRotAcc(const Degree& value)
    6863                { this->rotationAcceleration_ = value; }
     
    7065                { this->translationDamping_ = value; }
    7166
    72             inline float getMaxSpeed() const
    73                 { return this->maxSpeed_; }
    74             inline float getMaxSecondarySpeed() const
    75                 { return this->maxSecondarySpeed_; }
    7667            inline float getMaxRotation() const
    7768                { return this->maxRotation_.valueDegrees(); }
    78             inline float getTransAcc() const
    79                 { return this->translationAcceleration_; }
    8069            inline float getRotAcc() const
    8170                { return this->rotationAcceleration_.valueDegrees(); }
     
    8372                { return this->translationDamping_; }
    8473
     74            inline void setSteeringDirection(const Vector3& direction)
     75                { this->steering_ = direction; }
     76            inline const Vector3& getSteeringDirection() const
     77                { return this->steering_; }
     78
     79            inline void setBoost(bool bBoost)
     80                { this->bBoost_ = bBoost; }
     81            inline bool getBoost() const
     82                { return this->bBoost_; }
     83
     84            inline void setEngineTemplate(const std::string& temp)
     85                { this->enginetemplate_ = temp; this->loadEngineTemplate(); }
     86            inline const std::string& getEngineTemplate() const
     87                { return this->enginetemplate_; }
     88
    8589        protected:
    8690            bool bInvertYAxis_;
    8791
    88             float maxSpeed_;
    89             float maxSecondarySpeed_;
    90             float translationAcceleration_;
     92            bool bBoost_;
     93            Vector3 steering_;
    9194            float translationDamping_;
    9295
     
    98101            Degree yawRotation_;
    99102            Degree rollRotation_;
     103
     104        private:
     105            void loadEngineTemplate();
     106
     107            std::string enginetemplate_;
     108            Engine* engine_;
    100109    };
    101110}
Note: See TracChangeset for help on using the changeset viewer.