Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2018, 4:22:49 PM (7 years ago)
Author:
dreherm
Message:

Test 2

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

Legend:

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

    r11992 r12003  
    121121
    122122            //Check for collision with PointSpheres and PacmanPointAfraid
    123             i = 0;
    124123            for(PacmanPointSphere* nextsphere : ObjectList<PacmanPointSphere>()){
    125                 if(collis(nextsphere->getPosition(), currentPosition))
    126                  takePoint(nextsphere);
     124                 if(nextsphere->taken(currentPosition))
     125                    takePoint(nextsphere);
    127126            }
    128127
     
    208207            return;
    209208        }
    210         //Set PointSphere under map
    211         Vector3 postaken = taken->getPosition();
    212         postaken.y = -50;
    213         taken->setPosition(postaken);
    214209    }
    215210
  • code/branches/3DPacman_FS18/src/modules/pacman/PacmanPointSphere.cc

    r11992 r12003  
    7676    {
    7777        resetposition = this->getPosition();
    78       if((abs(this->resetposition.x - playerpos.x)<5) && (abs(this->resetposition.z - playerpos.z)<5)){
     78      if((abs(this->resetposition.x - playerpos.x)<5) && (abs(this->resetposition.y - playerpos.y)<5) && (abs(this->resetposition.z - playerpos.z)<5)){
    7979        this->setPosition(Vector3(resetposition.x, -50, resetposition.z));
    8080        return true;
    8181      }
    82 
    8382      return false;
    8483    }
Note: See TracChangeset for help on using the changeset viewer.