Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12252


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
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/3DPacman_FS19/data/levels/3DPacman.oxw

    r12045 r12252  
    3535
    3636<!-- GHOSTS -->
    37 <PacmanGhost position="0,10,15" >
     37<PacmanGhost position="0,10,15" colour='1'>
    3838    <attached>
    3939        <Model position="0,0,0" mesh="PacmanGhostRed.mesh" scale="5" />
     
    4141</PacmanGhost>
    4242
    43 <PacmanGhost position="0,10,15" >
     43<PacmanGhost position="0,10,15" colour='2'>
    4444    <attached>
    4545        <Model position="0,0,0" mesh="PacmanGhostBlue.mesh" scale="5" />
     
    4747</PacmanGhost>
    4848
    49 <PacmanGhost position="0,10,15" >
     49<PacmanGhost position="0,10,15" colour='3'>
    5050    <attached>
    5151        <Model position="0,0,0" mesh="PacmanGhostOrange.mesh" scale="5" />
     
    5353</PacmanGhost>
    5454
    55 <PacmanGhost position="0,10,15" >
     55<PacmanGhost position="0,10,15" colour='4'>
    5656    <attached>
    5757        <Model position="0,0,0" mesh="PacmanGhostPink.mesh" scale="5" />
  • 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.