Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/controllers/ActionpointController.h

    r11052 r11071  
    6565        All the demos are in a file called AITest.oxw. In the menu look for New AI Testing Level.
    6666    */
    67     namespace Action
     67    enum class Action
    6868    { 
    69         enum Value
    70         {
    71             NONE, FLY, FIGHT, PROTECT, FIGHTALL, ATTACK
    72         };
    73        
    74     }
     69        NONE, FLY, FIGHT, PROTECT, FIGHTALL, ATTACK
     70    };
    7571   
    7672    struct Point {
    77         Action::Value action;
     73        Action action;
    7874        std::string name;
    7975        Vector3 position;
    8076        bool inLoop;
    81     } ;
    82     namespace PickupType
    83     {
    84         enum Value
    85         { 
    86             NONE, DAMAGE, HEALTH, SPEED, PORTAL
    87         };
    88     }
     77    };
    8978
    9079    class _OrxonoxExport ActionpointController : public FightingController, public Tickable
     
    9483            ActionpointController(Context* context);
    9584            virtual ~ActionpointController();
    96             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);         
     85            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    9786               
    9887            /**
     
    10190                In tick ship flies and fires.
    10291            */
    103             virtual void tick(float dt);   
     92            virtual void tick(float dt) override;
    10493            /**
    10594            @brief
     
    186175            virtual void takeActionpoints (const std::vector<Point>& vector, const std::vector<Point>& loop, bool b);
    187176
    188             virtual Action::Value getAction ();
     177            virtual Action getAction ();
    189178            virtual std::string getActionName();
    190179
    191             void setAction (Action::Value action);
    192             void setAction (Action::Value action, ControllableEntity* target);
    193             void setAction (Action::Value action, const Vector3& target);
    194             void setAction (Action::Value action, const Vector3& target,  const Quaternion& orient );
     180            void setAction (Action action);
     181            void setAction (Action action, ControllableEntity* target);
     182            void setAction (Action action, const Vector3& target);
     183            void setAction (Action action, const Vector3& target,  const Quaternion& orient );
    195184
    196185            virtual bool setWingman(ActionpointController* wingman)
     
    210199                WeakPtr<ActionpointController> myDivisionLeader_;
    211200            //----[Actionpoint information]----
    212                 Action::Value action_;
     201                Action action_;
    213202                std::string protectName_;
    214203                std::string targetName_;
    215                 std::vector<WeakPtr<WorldEntity> > actionpoints_;
     204                std::vector<WeakPtr<WorldEntity>> actionpoints_;
    216205                float squaredaccuracy_;
    217                 std::vector<Point > parsedActionpoints_;//<! actionpoints as they are stored here after being parsed from XML
    218                 std::vector<Point > loopActionpoints_;  //<! actionpoints that are to be looped
     206                std::vector<Point> parsedActionpoints_; //<! actionpoints as they are stored here after being parsed from XML
     207                std::vector<Point> loopActionpoints_;   //<! actionpoints that are to be looped
    219208                bool bInLoop_;                          //<! variable for addActionpoint method
    220209                bool bLoop_;                            //<! is state machine looping?
Note: See TracChangeset for help on using the changeset viewer.