Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11931


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

HUD first commit

Location:
code/branches/3DPacman_FS18
Files:
3 added
6 edited

Legend:

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

    r11918 r11931  
    3434    <SpawnPoint team=0 position="0,10,245" lookat="0,0,0" spawnclass=PacmanGelb pawndesign=PacmanGelb />
    3535
    36 
    37 <--! GHOSTS -->
    38 <PacmanGhost position="0,0,0">
     36<!-- GHOSTS -->
     37<PacmanGhost position="0,10,15" >
    3938    <attached>
    4039        <Model position="0,0,0" mesh="PacmanGhostRed.mesh" scale="5" />
     
    4241</PacmanGhost>
    4342
    44 <PacmanGhost position="0,0,0">
     43<PacmanGhost position="0,10,15" >
    4544    <attached>
    4645        <Model position="0,0,0" mesh="PacmanGhostBlue.mesh" scale="5" />
     
    4847</PacmanGhost>
    4948
    50 <PacmanGhost position="0,0,0">
     49<PacmanGhost position="0,10,15" >
    5150    <attached>
    5251        <Model position="0,0,0" mesh="PacmanGhostOrange.mesh" scale="5" />
     
    5453</PacmanGhost>
    5554
    56 <PacmanGhost position="0,0,0">
     55<PacmanGhost position="0,10,15" >
    5756    <attached>
    5857        <Model position="0,0,0" mesh="PacmanGhostPink.mesh" scale="5" />
     
    6059</PacmanGhost>
    6160
    62 <--! POINTS -->
     61<!-- POINTS -->
    6362<PacmanPointSphere position="0,10,0">
    6463    <attached>
     
    8079
    8180
    82 
    83 
    84 <--! Map -->
     81<!-- Map -->
    8582<StaticEntity position="0,0,25" direction="0,0,0" collisionType=static mass=100000 friction=0.01 >
    8683    <attached>
     
    8986    <collisionShapes>
    9087
    91   <--! Edge -->
    92         <BoxCollisionShape position="250,10,0" halfExtents="1,15,250" />
    93         <BoxCollisionShape position="-250,10,0" halfExtents="1,15,250" />
     88  <!-- Edge --> 
     89  <BoxCollisionShape position="250,10,0" halfExtents="1,15,250" />
     90  <BoxCollisionShape position="-250,10,0" halfExtents="1,15,250" />
    9491  <BoxCollisionShape position="0,10,250" halfExtents="250,15,1" />
    9592  <BoxCollisionShape position="0,10,-250" halfExtents="250,15,1" />
    9693
    97   <--! Shapes in order -->
    98   <BoxCollisionShape position="-35,10,-200" halfExtents="40,15,25" />
    99   <BoxCollisionShape position="60,10,-200" halfExtents="40,15,25" />
    100   <BoxCollisionShape position="-35,10,200" halfExtents="40,15,25" />
    101   <BoxCollisionShape position="60,10,200" halfExtents="40,15,25" />
    102 
    103   <BoxCollisionShape position="-175,10,-165" halfExtents="30,15,20" />
    104 
    105 
     94   <!-- Shapes in order -->   
     95  <BoxCollisionShape position="-200,10,-65" halfExtents="55,15,35" />
     96  <BoxCollisionShape position="-200,10,30" halfExtents="55,15,35" />
     97  <BoxCollisionShape position="200,10,-65" halfExtents="55,15,35" />
     98  <BoxCollisionShape position="200,10,30" halfExtents="55,15,35" />
    10699
    107100    </collisionShapes>
     
    112105<PortalLink fromID="1" toID="2" />
    113106<PortalLink fromID="2" toID="1" />
    114 
    115107  </Scene>
    116108</Level>
  • code/branches/3DPacman_FS18/data/levels/templates/PacmanGelb.oxt

    r11900 r11931  
    5050    </attached>
    5151    <collisionShapes>
    52       <BoxCollisionShape position="0    ,0 ,  3" halfExtents="10,   4,8" />
    53       <BoxCollisionShape position="12.6 ,-2,  3" halfExtents="2.8,2.8,11"/>
    54       <BoxCollisionShape position="-12.6,-2,  3" halfExtents="2.8,2.8,11"/>
    55       <BoxCollisionShape position="0,     0,-12" halfExtents="4  , 4 ,7" />
     52      <BoxCollisionShape position="0    ,0 ,  0" halfExtents="1,1,1" />
    5653    </collisionShapes>
    5754
     
    7471   boostfactor    = 1.0
    7572
    76    speedfront     = 50
     73   speedfront     = 60
    7774   speedback      = 20
    7875   speedleftright =  1
  • 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.