Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 22, 2018, 1:04:40 PM (6 years ago)
Author:
dreherm
Message:

Debugged levelup

File:
1 edited

Legend:

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

    r11978 r11979  
    6464        }
    6565        this->posreset();
     66
     67        totallevelpoint = ObjectList<PacmanPointSphere>().size() + totallevelpoint;
     68        level++;
    6669    }
    6770
     
    124127        }
    125128
    126         }
    127 
    128 
    129        
     129        }
    130130
    131131    }
     
    193193    }
    194194
     195    int Pacman::getLevel(){
     196        return level;
     197    }
     198
    195199    void Pacman::posreset(){
    196200        for(int i = 0; i<4; ++i){
     
    202206    void Pacman::takePoint(PacmanPointSphere* taken){
    203207        ++point;
    204         if(point == totallevelpoint) this->levelUp();
     208        if(point == totallevelpoint){
     209            this->levelUp();
     210            return;
     211        }
    205212        Vector3 postaken = taken->getPosition();
    206213        postaken.y = -50;
Note: See TracChangeset for help on using the changeset viewer.