Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 29, 2015, 11:53:45 AM (9 years ago)
Author:
gania
Message:

Wingmen and Leaders look for their leaders

File:
1 edited

Legend:

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

    r10709 r10717  
    3131
    3232
    33 #include "controllers/Controller.h"
     33#include "controllers/CommonController.h"
    3434
    3535
    36 #include "OrxonoxPrereqs.h"
    37 #include "core/class/Super.h"
    38 #include "core/CoreIncludes.h"
    39 #include "core/XMLPort.h"
    40 #include "core/command/ConsoleCommandIncludes.h"
    41 #include "core/command/Executor.h"
    42 
    43 #include <vector>
    4436#include "util/Math.h"
    45 #include <climits>
    46 
    4737#include "tools/Timer.h"
    4838#include "tools/interfaces/Tickable.h"
    49 
    50 #include "worldentities/ControllableEntity.h"
    51 #include "worldentities/pawns/SpaceShip.h"
    52 #include "worldentities/pawns/Pawn.h"
    53 #include "worldentities/pawns/TeamBaseMatchBase.h"
    54 
    55 #include "gametypes/TeamDeathmatch.h"
    56 #include "gametypes/Dynamicmatch.h"
    57 #include "gametypes/Mission.h"
    58 #include "gametypes/Gametype.h"
    59 
    6039
    6140
    6241namespace orxonox
    6342{
    64     class _OrxonoxExport WingmanController : public Controller, public Tickable
     43    class _OrxonoxExport WingmanController : public CommonController, public Tickable
    6544    {
    6645        public:
    6746            WingmanController(Context* context);
    6847            virtual ~WingmanController();
    69             //virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     48            virtual bool isLeader();
     49          //virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    7050            virtual void tick(float dt); //<! Carrying out the targets set in action().
    7151
    7252        protected:
     53            CommonController* findNewLeader();
     54
    7355            virtual void action(); //<! action() is called in regular intervals managing the bot's behaviour ~ setting targets.
    7456            //void defaultBehaviour(float maxrand); //<! Helper function for code reusage. Some concrete commands for a bot.
     
    8062           
    8163            WeakPtr<Pawn> target_;
    82            
     64            CommonController* myLeader_;
    8365            //LeaderController* leader_;
    8466
Note: See TracChangeset for help on using the changeset viewer.