Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 14, 2018, 10:01:05 AM (5 years ago)
Author:
linggj
Message:

12

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/WorldMap_HS18/src/orxonox/controllers/StoryModeController.cc

    r12060 r12101  
    3636    RegisterClass(StoryModeController);
    3737
    38    StoryModeController::StoryModeController(Context* context) : ArtificialController(context)
     38   StoryModeController::StoryModeController(Context* context) : Pawn(context)
    3939    {
    4040        RegisterObject(StoryModeController);
    41         this->setAccuracy(100);
     41        moveRight_ = false;
     42        moveLeft_ = false;
     43        //this->setAccuracy(50);
    4244    }
    4345
    4446    StoryModeController::~StoryModeController()
    4547    {
    46         for (WorldEntity* waypoint : this->waypoints_)
     48        /*for (WorldEntity* waypoint : this->waypoints_)
    4749        {
    4850            if(waypoint)
    4951                waypoint->destroy();
    50         }
     52        }*/
     53
    5154    }
    5255
    5356    void StoryModeController::tick(float dt)
    5457    {
    55         if (!this->isActive())
     58        orxout(internal_error) << "Hi" << endl;
     59       
     60        /*if (!this->isActive())
    5661            return;
    5762
     
    5964            return;
    6065
    61         if (false /* this->waypoints_[this->currentWaypoint_]->getWorldPosition().squaredDistance(this->getControllableEntity()->getPosition()) <= this->squaredaccuracy_*/)
    62             this->currentWaypoint_ = (this->currentWaypoint_ + 1) % this->waypoints_.size();
     66        if (false /* this->waypoints_[this->currentWaypoint_]->getWorldPosition().squaredDistance(this->getControllableEntity()->getPosition()) <= this->squaredaccuracy_*///)
     67            //this->currentWaypoint_ = (this->currentWaypoint_ + 1) % this->waypoints_.size();
    6368
    6469        //this->moveToPosition(this->waypoints_[this->currentWaypoint_]->getWorldPosition());
    6570    }
    6671
     72    void StoryModeController::moveFrontBack(const Vector2& value)
     73    {
     74        orxout(internal_error) << "FrontBack" << endl;
     75
     76           
     77    }
     78    void StoryModeController::moveRightLeft(const Vector2& value)
     79    {
     80        orxout(internal_error) << "RightLeft" << endl;
     81        if (value.x>0){
     82            moveRight_ =false;
     83            moveLeft_ =true;
     84
     85        }
     86
     87    }
     88
     89    void StoryModeController::rotateYaw(const Vector2& value){}
     90    void StoryModeController::rotatePitch(const Vector2& value){}
     91    void StoryModeController::rotateRoll(const Vector2& value){}
     92    void StoryModeController::fire(unsigned int a){}
     93    void StoryModeController::fired(unsigned int b){}
     94    void StoryModeController::boost(bool bBoost){}
    6795}
Note: See TracChangeset for help on using the changeset viewer.