Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 20, 2011, 12:03:21 AM (13 years ago)
Author:
jo
Message:

Repairing setbotlevel command. Start of a presentation level.

Location:
code/branches/presentation2011/src/orxonox/controllers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2011/src/orxonox/controllers/ArtificialController.cc

    r8992 r9006  
    2929#include "ArtificialController.h"
    3030#include "core/CoreIncludes.h"
     31#include "core/command/ConsoleCommand.h"
    3132#include "worldentities/pawns/Pawn.h"
    3233#include "worldentities/pawns/SpaceShip.h"
     
    4142namespace orxonox
    4243{
     44    SetConsoleCommand("ArtificialController", "setbotlevel",      &ArtificialController::setAllBotLevel);
    4345
    4446    ArtificialController::ArtificialController(BaseObject* creator) : FormationController(creator)
     
    113115    }
    114116
    115 //****************************************************************************************** NEW
    116117    /**
    117118        @brief DoFire is called when a bot should shoot and decides which weapon is used and whether the bot shoots at all.
  • code/branches/presentation2011/src/orxonox/controllers/ArtificialController.h

    r8992 r9006  
    3333#include "controllers/FormationController.h"
    3434
     35
    3536namespace orxonox
    3637{
     
    4445
    4546            virtual void changedControllableEntity();
    46 //************************************************************************* NEW
     47
    4748            virtual void doFire();
    4849            void setBotLevel(float level=1.0f);
     
    6970            bool isCloseAtTarget(float distance) const;
    7071            bool isLookingAtTarget(float angle) const;
    71 //************************************************************************* NEW
     72
    7273            float botlevel_; //<! Makes the level of a bot configurable.
    7374            enum Mode {DEFAULT, ROCKET, DEFENCE, MOVING};//TODO; implement DEFENCE, MOVING modes
  • code/branches/presentation2011/src/orxonox/controllers/FormationController.cc

    r9005 r9006  
    8686        this->bShooting_ = false;
    8787        this->bHasTargetPosition_ = false;
    88         this->bHasTargetOrientation_=false;
     88        this->bHasTargetOrientation_=false;
    8989        this->speedCounter_ = 0.2f;
    9090        this->targetPosition_ = Vector3::ZERO;
Note: See TracChangeset for help on using the changeset viewer.