Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 28, 2019, 3:09:12 PM (6 years ago)
Author:
rueegseb
Message:

Added a feature to differentiate the seperate ghosts

Location:
code/branches/3DPacman_FS19/src/modules/pacman
Files:
2 edited

Legend:

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

    r12009 r12252  
    4747
    4848        this->velocity = Vector3(0, 0, 0);
    49 
     49        this->colour = 1;
    5050        this->setCollisionType(CollisionType::Dynamic);
    5151       
     
    7676    {
    7777        SUPER(PacmanGhost, XMLPort, xmlelement, mode);
     78
     79        XMLPortParam(PacmanGhost, "colour", setColour, getColour, xmlelement, mode);
     80
    7881    }
    7982
  • code/branches/3DPacman_FS19/src/modules/pacman/PacmanGhost.h

    r11992 r12252  
    5858            bool dontmove = false;
    5959
     60            //analog AutonomousDrone.h
     61            inline void setColour( int newColour )
     62                { this->coulour = newColour; }
     63
     64            inline int getColour()
     65                { return this->coulour;}
     66
    6067        private:
    6168            int decision = 0;
     
    6976            int target_z = 0;
    7077            bool lockmove = false;
    71 
     78            int colour=0;
     79            /*
     80            colour=
     81            1: red
     82            2: blue
     83            3: orange
     84            4: pink
     85            */
    7286            void setnewTarget(int firstdec);
    7387            void setnewTarget(int firstdec, int seconddec);
Note: See TracChangeset for help on using the changeset viewer.