Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 2, 2015, 4:48:27 PM (9 years ago)
Author:
gania
Message:

small fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/AI_HS15/src/orxonox/controllers/CommonController.h

    r10737 r10759  
    3333#include "controllers/Controller.h"
    3434#include "worldentities/ControllableEntity.h"
    35 /*#include "worldentities/pawns/Pawn.h"
    36 */
     35#include "worldentities/pawns/Pawn.h"
     36
    3737
    3838namespace orxonox
    3939{
     40
     41    namespace FormationMode
     42    {
     43        enum Value
     44        {
     45            VEE, FINGER4, DIAMOND, WALL
     46        };
     47    }
     48    namespace Rank
     49    {
     50        enum Value
     51        {
     52            NONE, SECTIONLEADER, DIVISIONLEADER, WINGMAN
     53        };
     54
     55    }
     56
    4057    class _OrxonoxExport CommonController : public Controller
    4158    {
     
    5067
    5168
    52             enum FormationMode { VEE, FINGER4, DIAMOND, WALL };
    53             virtual void setFormationMode(FormationMode val)
     69
     70
     71            virtual void setFormationMode(FormationMode::Value val)
    5472                { this->formationMode_ = val; }
    55             inline FormationMode getFormationMode() const
     73            inline FormationMode::Value getFormationMode() const
    5674                { return this->formationMode_; }
     75            virtual void setFormationModeXML(std::string val);
     76            virtual std::string getFormationModeXML();
    5777
    58             enum Rank { NONE, SECTIONLEADER, DIVISIONLEADER, WINGMAN };
    59             virtual void setRank(Rank val)
     78            virtual void setRank(Rank::Value val)
    6079                { this->rank_ = val; }
    61             inline Rank getRank() const
     80            inline Rank::Value getRank() const
    6281                { return this->rank_; }
    6382
     83            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    6484
    6585
     
    6888            virtual bool hasWingman();
    6989
     90            void setTarget(ControllableEntity* target);
    7091
    7192            void setTargetOrientation(const Quaternion& orient);
     
    87108            void copyTargetOrientation();
    88109
    89           /*  bool isCloseAtTarget(float distance) const;
     110            bool isCloseAtTarget(float distance) const;
    90111            void doFire();
    91112            void aimAtTarget();
     
    99120            bool bSetupWorked; //<! If false, setupWeapons() is called.
    100121            int getFiremode(std::string name);
    101 */
     122
    102123
    103124            bool bHasTargetPosition_;
     
    111132
    112133
    113             FormationMode formationMode_;
    114             Rank rank_;
     134            FormationMode::Value formationMode_;
     135            Rank::Value rank_;
    115136
    116137
Note: See TracChangeset for help on using the changeset viewer.