Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11961


Ignore:
Timestamp:
May 14, 2018, 1:08:06 PM (7 years ago)
Author:
dreherm
Message:

HUD work

Location:
code/branches/3DPacman_FS18
Files:
4 edited

Legend:

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

    r11958 r11961  
    17701770
    17711771  <!-- Edge --> 
    1772   <BoxCollisionShape position="250,10,0" halfExtents="15,15,250" />
    1773   <BoxCollisionShape position="-250,10,0" halfExtents="15,15,250" />
    1774   <BoxCollisionShape position="0,10,250" halfExtents="250,15,15" />
    1775   <BoxCollisionShape position="0,10,-250" halfExtents="250,15,15" />
     1772  <BoxCollisionShape position="250,30,0" halfExtents="15,15,250" />
     1773  <BoxCollisionShape position="-250,30,0" halfExtents="15,15,250" />
     1774  <BoxCollisionShape position="0,30,250" halfExtents="250,15,15" />
     1775  <BoxCollisionShape position="0,30,-250" halfExtents="250,15,15" />
    17761776
    17771777   <!-- Shapes in order -->   
    1778   <BoxCollisionShape position="-200,10,-65" halfExtents="55,15,35" />
    1779   <BoxCollisionShape position="-200,10,30" halfExtents="55,15,35" />
    1780   <BoxCollisionShape position="200,10,-65" halfExtents="55,15,35" />
    1781   <BoxCollisionShape position="200,10,30" halfExtents="55,15,35" />
    1782   <BoxCollisionShape position="-175,10,-195" halfExtents="30,15,20" /> <!-- 5 --> 
    1783   <BoxCollisionShape position="-80,10,-195" halfExtents="40,15,20" />
    1784   <BoxCollisionShape position="-175,10,-140" halfExtents="30,15,10" />
    1785   <BoxCollisionShape position="0,10,-210" halfExtents="10,15,30" />
    1786   <BoxCollisionShape position="80,10,-195" halfExtents="40,15,20" />
    1787   <BoxCollisionShape position="175,10,-195" halfExtents="30,15,20" /> <!-- 10 -->
    1788   <BoxCollisionShape position="175,10,-140" halfExtents="30,15,10" />
    1789   <BoxCollisionShape position="0,10,-140" halfExtents="60,15,10" />
    1790   <BoxCollisionShape position="0,10,-110" halfExtents="10,15,25" />
    1791   <BoxCollisionShape position="-100,10,-90" halfExtents="10,15,60" />
    1792   <BoxCollisionShape position="-70,10,-90" halfExtents="25,15,10" /> <!-- 15 -->
    1793   <BoxCollisionShape position="100,10,-90" halfExtents="10,15,60" />
    1794   <BoxCollisionShape position="70,10,-90" halfExtents="25,15,10" />
    1795   <BoxCollisionShape position="0,10,-20" halfExtents="60,15,35" />
    1796   <BoxCollisionShape position="-100,10,30" halfExtents="10,15,35" />
    1797   <BoxCollisionShape position="0,10,50" halfExtents="60,15,10" /> <!-- 20 -->
    1798   <BoxCollisionShape position="0,10,80" halfExtents="10,15,25" />
    1799   <BoxCollisionShape position="100,10,30" halfExtents="10,15,35" />
    1800   <BoxCollisionShape position="-175,10,100" halfExtents="30,15,10" />
    1801   <BoxCollisionShape position="-155,10,130" halfExtents="10,15,25" />
    1802   <BoxCollisionShape position="-75,10,100" halfExtents="35,15,10" /> <!-- 25 -->
    1803   <BoxCollisionShape position="75,10,100" halfExtents="35,15,10" />
    1804   <BoxCollisionShape position="175,10,100" halfExtents="30,15,10" />
    1805   <BoxCollisionShape position="155,10,130" halfExtents="10,15,25" />
    1806   <BoxCollisionShape position="-220,10,150" halfExtents="20,15,10" />
    1807   <BoxCollisionShape position="-220,10,150" halfExtents="20,15,10" /> <!-- 30 -->
    1808   <BoxCollisionShape position="0,10,150" halfExtents="60,15,10" />
    1809   <BoxCollisionShape position="0,10,180" halfExtents="10,15,25" />
    1810   <BoxCollisionShape position="-100,10,170" halfExtents="10,15,25" />
    1811   <BoxCollisionShape position="-125,10,200" halfExtents="80,15,10" />
    1812   <BoxCollisionShape position="100,10,170" halfExtents="10,15,25" /> <!-- 35 -->
    1813   <BoxCollisionShape position="125,10,200" halfExtents="80,15,10" />
     1778  <BoxCollisionShape position="-200,30,-65" halfExtents="55,15,35" />
     1779  <BoxCollisionShape position="-200,30,30" halfExtents="55,15,35" />
     1780  <BoxCollisionShape position="200,30,-65" halfExtents="55,15,35" />
     1781  <BoxCollisionShape position="200,30,30" halfExtents="55,15,35" />
     1782  <BoxCollisionShape position="-175,30,-195" halfExtents="30,15,20" /> <!-- 5 --> 
     1783  <BoxCollisionShape position="-80,30,-195" halfExtents="40,15,20" />
     1784  <BoxCollisionShape position="-175,30,-140" halfExtents="30,15,10" />
     1785  <BoxCollisionShape position="0,30,-210" halfExtents="10,15,30" />
     1786  <BoxCollisionShape position="80,30,-195" halfExtents="40,15,20" />
     1787  <BoxCollisionShape position="175,30,-195" halfExtents="30,15,20" /> <!-- 10 -->
     1788  <BoxCollisionShape position="175,30,-140" halfExtents="30,15,10" />
     1789  <BoxCollisionShape position="0,30,-140" halfExtents="60,15,10" />
     1790  <BoxCollisionShape position="0,30,-110" halfExtents="10,15,25" />
     1791  <BoxCollisionShape position="-100,30,-90" halfExtents="10,15,60" />
     1792  <BoxCollisionShape position="-70,30,-90" halfExtents="25,15,10" /> <!-- 15 -->
     1793  <BoxCollisionShape position="100,30,-90" halfExtents="10,15,60" />
     1794  <BoxCollisionShape position="70,30,-90" halfExtents="25,15,10" />
     1795  <BoxCollisionShape position="0,30,-20" halfExtents="60,15,35" />
     1796  <BoxCollisionShape position="-100,30,30" halfExtents="10,15,35" />
     1797  <BoxCollisionShape position="0,30,50" halfExtents="60,15,10" /> <!-- 20 -->
     1798  <BoxCollisionShape position="0,30,80" halfExtents="10,15,25" />
     1799  <BoxCollisionShape position="100,30,30" halfExtents="10,15,35" />
     1800  <BoxCollisionShape position="-175,30,100" halfExtents="30,15,10" />
     1801  <BoxCollisionShape position="-155,30,130" halfExtents="10,15,25" />
     1802  <BoxCollisionShape position="-75,30,100" halfExtents="35,15,10" /> <!-- 25 -->
     1803  <BoxCollisionShape position="75,30,100" halfExtents="35,15,10" />
     1804  <BoxCollisionShape position="175,30,100" halfExtents="30,15,10" />
     1805  <BoxCollisionShape position="155,30,130" halfExtents="10,15,25" />
     1806  <BoxCollisionShape position="-220,30,150" halfExtents="20,15,10" />
     1807  <BoxCollisionShape position="-220,30,150" halfExtents="20,15,10" /> <!-- 30 -->
     1808  <BoxCollisionShape position="0,30,150" halfExtents="60,15,10" />
     1809  <BoxCollisionShape position="0,30,180" halfExtents="10,15,25" />
     1810  <BoxCollisionShape position="-100,30,170" halfExtents="10,15,25" />
     1811  <BoxCollisionShape position="-125,30,200" halfExtents="80,15,10" />
     1812  <BoxCollisionShape position="100,30,170" halfExtents="10,15,25" /> <!-- 35 -->
     1813  <BoxCollisionShape position="125,30,200" halfExtents="80,15,10" />
    18141814
    18151815
  • code/branches/3DPacman_FS18/data/overlays/PacmanHUD.oxo

    r11958 r11961  
    55<Template name="PacmanHUD">
    66  <OverlayGroup name="PacmanHUD" scale = "1, 1">
    7    
     7   
     8  </OverlayGroup>
     9</Template>
     10
     11
     12<Template name="spaceshiphud">
     13  <OverlayGroup name = "spaceshiphud" scale = "1, 1">
     14
    815    <PacmanHUDinfo
    9      position  = "0.02, 0.01"
     16     position  = "0.4, 0.01"
    1017     pickpoint = "0.0, 0.0"
    1118     font      = "ShareTechMono"
    1219     textsize  = 0.04
    1320     colour    = "1.0, 1.0, 1.0, 1.0"
    14      align     = "left"
     21     align     = "right"
    1522
    1623     showpoints     = true
    1724    />
    18    
    19   </OverlayGroup>
     25
     26    <PacmanHUDinfo
     27     position  = "0.4, 0.1"
     28     pickpoint = "0.0, 0.0"
     29     font      = "ShareTechMono"
     30     textsize  = 0.04
     31     colour    = "1.0, 1.0, 1.0, 1.0"
     32     align     = "right"
     33
     34     showghoststatus     = true
     35    />
     36
     37 </OverlayGroup>
    2038</Template>
  • code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.cc

    r11958 r11961  
    4545        this->bShowPoints_ = false;
    4646        this->bShowMessage_ = false;
     47        this->bShowGhoststatus_ = false;
    4748        this->messageID = 0;
     49
    4850    }
    4951
     
    5456        XMLPortParam(PacmanHUDinfo, "showpoints",    setShowPoints,    getShowPoints,    xmlelement, mode).defaultValues(false);
    5557        XMLPortParam(PacmanHUDinfo, "showmessage",   setShowMessage,   getShowMessage,   xmlelement, mode).defaultValues(false);
     58        XMLPortParam(PacmanHUDinfo, "showghoststatus",   setGhoststatus,   getGhoststatus,   xmlelement, mode).defaultValues(false);
    5659        XMLPortParam(PacmanHUDinfo, "messageID",     setMessageID,     getMessageID,     xmlelement, mode).defaultValues(0);
    5760       
     
    6669        {
    6770                if(this->bShowPoints_){
    68                     const std::string& points = "Score: "+multi_cast<std::string>(this->PacmanGame->getPoints());
     71                    const std::string& points = "Collected points: "+multi_cast<std::string>(this->PacmanGame->getPoints()) + " of " + multi_cast<std::string>(this->PacmanGame->totallevelpoint);
    6972                    setTextSize(0.04);
    7073                    this->setCaption(points);
     74                }
     75                if(this->bShowGhoststatus_){
     76                    const std::string& ghoststatus = "Do not get caught!";
     77                    //if(this->PacmanGame->afraid) const std::string& ghoststatus = "Catch the ghosts!";
     78                    orxout() << "Test Hier" << endl;
     79                    setTextSize(0.04);
     80                    this->setCaption(ghoststatus);
    7181                }
    7282        }
  • code/branches/3DPacman_FS18/src/modules/pacman/PacmanHUDinfo.h

    r11931 r11961  
    6363                { return messageID; }
    6464
     65            inline void setGhoststatus(int value){
     66                this->bShowGhoststatus_ = value;
     67            }
     68            inline int getGhoststatus() const
     69                { return this->bShowGhoststatus_; }
     70
    6571        private:
    6672            Pacman* PacmanGame;
    6773            bool bShowPoints_;
    6874            bool bShowMessage_;
     75            bool bShowGhoststatus_;
    6976            int messageID;
    7077    };
Note: See TracChangeset for help on using the changeset viewer.