Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11921 for code


Ignore:
Timestamp:
Apr 29, 2018, 1:55:17 PM (6 years ago)
Author:
dreherm
Message:

Disk quota test 2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc

    r11919 r11921  
    4646        RegisterObject(PacmanGhost);
    4747
    48         this->velocity = Vector3(0, 0, 0);
     48       /* this->velocity = Vector3(0, 0, 0);
    4949
    5050        this->setCollisionType(CollisionType::Dynamic);
     
    5555       
    5656        this->target_x = actuelposition.x;
    57         this->target_z = actuelposition.z;
     57        this->target_z = actuelposition.z; */
    5858
    5959    }
     
    7878
    7979
    80    
     80   /*
    8181    Vector3 possibleposition[] = {Vector3(20,10,245),Vector3(215,10,245),Vector3(215,10,195),Vector3(185,10,195),Vector3(135,10,195), //0-4
    8282        Vector3(185,10,150),Vector3(135,10,150),Vector3(215,10,150),Vector3(215,10,105),Vector3(135,10,105), //5-9
     
    9494        Vector3(-215,10,-195),Vector3(0,10,-35) //65-66
    9595    };
    96 
     96*/
    9797    /**
    9898    @brief
     
    106106
    107107        //setorientation
    108 
     108/*
    109109        this->actuelposition = this->getPosition();
    110110       
     
    331331            } //End of Position table
    332332            }
    333 
     333*/
    334334    }
    335335
    336336    void PacmanGhost::setnewTarget(int firstdec){
     337        /*
    337338          decision = rand()%1;
    338339            switch(decision){
     
    343344                    break;
    344345                }
    345     }
    346 
    347     void PacmanGhost::setnewTarget(int firstdec, int seconddec){
     346            */
     347    }
     348
     349    void PacmanGhost::setnewTarget(int firstdec, int seconddec){ /*
    348350           decision = rand()%2;
    349351            switch(decision){
     
    359361                    break; 
    360362            }
     363            */
    361364    }
    362365
    363366    void PacmanGhost::setnewTarget(int firstdec, int seconddec, int thirddec){
     367        /*
    364368           decision = rand()%3;
    365369            switch(decision){
     
    380384                    break;   
    381385                }
     386            */
    382387        }
    383388
    384389    void PacmanGhost::setnewTarget(int firstdec, int seconddec, int thirddec, int fourthdec){
     390        /*
    385391           decision = rand()%4;
    386392            switch(decision){
     
    406412                    break;   
    407413                }
     414            */
    408415        }
    409416
     
    411418
    412419    void PacmanGhost::move(float dt, Vector3 actuelposition, Vector3 velocity){
    413         this->setPosition(Vector3(actuelposition.x+20*velocity.x*dt,10,actuelposition.z+20*velocity.z*dt));
     420       // this->setPosition(Vector3(actuelposition.x+20*velocity.x*dt,10,actuelposition.z+20*velocity.z*dt));
    414421    }
    415422
    416423    bool PacmanGhost::findpos(Vector3 one, Vector3 other){
    417         if((abs(one.x - other.x)<0.5) && (abs(one.z - other.z)<0.5)) return true;
    418         return false;
     424       /* if((abs(one.x - other.x)<0.5) && (abs(one.z - other.z)<0.5)) return true;
     425        return false; */
    419426    }
    420427
    421428    void PacmanGhost::resetGhost(){
     429        /*
    422430        this->setPosition(this->resetposition);
    423431        this->ismoving = false;
     
    426434        this->target_x = actuelposition.x;
    427435        this->target_z = actuelposition.z;
     436        */
    428437    }
    429438}
Note: See TracChangeset for help on using the changeset viewer.