Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 27, 2015, 4:42:14 PM (8 years ago)
Author:
gania
Message:

CommonController now has static methods only. Replace with a namespace?

File:
1 edited

Legend:

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

    r10875 r10877  
    3232
    3333#include "controllers/Controller.h"
     34#include <limits>
     35
    3436#include "worldentities/ControllableEntity.h"
    3537#include "worldentities/pawns/Pawn.h"
    3638
    37 #include "tools/Timer.h"
    38 #include "tools/interfaces/Tickable.h"
    39 #include <limits>
    40 #include "worldentities/Actionpoint.h"
    4139
    4240namespace orxonox
    4341{
    44     class _OrxonoxExport CommonController : public Controller, public Tickable
     42    class _OrxonoxExport CommonController : public Controller
    4543    {
    4644
    4745        public:
     46            static const float ACTION_INTERVAL = 1.0f;
     47
    4848            static const float hardcoded_projectile_speed = 750;
    49             static const float ACTION_INTERVAL = 1.0f;
    5049
    5150            CommonController(Context* context);
    5251            virtual ~CommonController();
    5352
    54             virtual void tick(float dt);
    55 
    56             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    57                
    58 
    59 
    60             virtual bool setWingman(CommonController* wingman);
    61             virtual bool hasWingman();       
    62 
    63 
    64             float randomInRange(float a, float b);
     53            static float randomInRange(float a, float b);
    6554            static float distance(ControllableEntity* entity1, ControllableEntity* entity2);
    6655            static bool sameTeam (ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gt);
    6756            static bool isLooking( ControllableEntity* entityThatLooks, ControllableEntity* entityBeingLookedAt, float angle ) ;
    68             static std::string getName( Pawn* entity ) ;
    69 
    70         protected:
    71            
    72             bool bFirstTick_;
    73            
    74            
     57            static std::string getName( Pawn* entity ) ;           
    7558    };
    7659}
Note: See TracChangeset for help on using the changeset viewer.