Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 3, 2018, 2:57:35 PM (7 years ago)
Author:
dreherm
Message:

HUD first commit

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

Legend:

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

    r11915 r11931  
    4444        RegisterObject(Pacman);
    4545
     46       // firstGame = true;                   //needed for the HUD
    4647        lives = 10;
    4748        point = 0;
    4849        level = 1;
    4950
     51       // setHUDTemplate("PacmanOrxHUD");
     52       // scoreboardTemplate_ = "";
    5053    }
    5154
     
    97100
    98101    bool Pacman::collis(Vector3 one, Vector3 other){
    99         if((abs(one.x-other.x)<7) && (abs(one.y-other.y)<7) && (abs(one.z-other.z)<7))
     102        if((abs(one.x-other.x)<10) && (abs(one.y-other.y)<10) && (abs(one.z-other.z)<10))
    100103            return true;
    101104        return false;
     
    146149    void Pacman::end()
    147150    {
     151        /*
     152        firstGame = false;
     153       
     154        //Set randomized deathmessages
     155        if(point<7)         sDeathMessage = DeathMessage7[rand()%(DeathMessage7.size())];
     156        else if(point<20)   sDeathMessage = DeathMessage20[rand()%(DeathMessage20.size())];
     157        else if(point<30)   sDeathMessage = DeathMessage30[rand()%(DeathMessage30.size())];
     158        else                sDeathMessage = DeathMessageover30[rand()%(DeathMessageover30.size())];
     159       
     160        //Update Highscore
     161        if (Highscore::exists())
     162        {
     163            int score = this->getPoints();
     164            Highscore::getInstance().storeScore("Pacman", score, this->getPlayer()->getPlayer());
     165        }
     166
     167
    148168        if (Highscore::exists())
    149169        {
     
    151171            //Highscore::getInstance().storeScore("3DPacman", score, this->playerInfo_);
    152172        }
     173        */
    153174        GSLevel::startMainMenu();
    154175    }
  • code/branches/3DPacman_FS18/src/modules/pacman/Pacman.h

    r11915 r11931  
    9494            Vector3 startposplayer = Vector3(0,10,245);
    9595            int totallevelpoint = 3;
     96            //bool firstGame;
    9697           
    9798       private:
     
    107108            Timer showLevelTimer;
    108109
    109 
    110          /*
    111 
    112             //void spawnEnemy();
    113 
    114 
    115 
    116 
    117 
    118 
    119 
    120 
    121 
    122 
    123 
    124 
    125         private:
    126 
    127 
    128 
    129 
    130             //Context* context;
    131             */
     110/*
     111std::string sDeathMessage;
     112const std::vector<std::string> DeathMessage7 = {
     113                "You should really try that again",
     114                "You can do better, can you?",
     115                "Hey, maybe you get a participation award, that's good isn't it?",
     116                "Congratulations, you get a medal, a wooden one",
     117                "That was flappin bad!",
     118                "Well, that was a waste of time",
     119                "You suck!",
     120                "Maybe try SuperOrxoBros. That game is not as hard.",
     121                "Here's a tip: Try not to fly into these grey thingies.",
     122                "We won't comment on that."};
     123            const std::vector<std::string> DeathMessage20 = {
     124                "Getting better!",
     125                "Training has paid off, huh?",
     126                "Good average!",
     127                "That was somehow enjoyable to watch",
     128                "Flappin average",
     129                "Getting closer to something",
     130                "That wasn't crap, not bad",
     131                "Surprisingly not bad."};
     132  */     
     133       
    132134    };
    133135}
    134136
    135 #endif /* _DodgeRace_H__ */
     137#endif /* _Pacman_H__ */
  • code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.cc

    r11927 r11931  
    4949
    5050        this->setCollisionType(CollisionType::Dynamic);
    51 
    52         this->resetposition = this->getPosition(); //Set Default start position
    5351       
    5452        this->actuelposition = this->getPosition();
     
    325323                setnewTarget(56,64);
    326324            }
     325            else if(findpos(actuelposition,possibleposition[66])){
     326                setnewTarget(47,48);
     327            }
    327328
    328329            else{
  • code/branches/3DPacman_FS18/src/modules/pacman/PacmanGhost.h

    r11920 r11931  
    6767            Vector3 actuelposition;
    6868            Vector3 velocity;
    69             Vector3 resetposition;
     69            Vector3 resetposition = Vector3(0,10,15);
    7070    };
    7171
Note: See TracChangeset for help on using the changeset viewer.