Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7635


Ignore:
Timestamp:
Nov 10, 2010, 9:59:50 PM (13 years ago)
Author:
jo
Message:

NON-compiling version. Work in Progress.

Location:
code/branches/lastmanstanding
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/lastmanstanding/data/overlays/lastmanstandinghud.oxo

    r7581 r7635  
    2020     align    = "center"
    2121    />
     22    <!--LastManStandingInfos
     23     position  = "0.63, 0.05"
     24     pickpoint = "0.0, 0.0"
     25     font      = "ShareTechMono"
     26     textsize  = 0.04
     27     colour    = "0.8, 0.8, 1.0, 1.0"
     28     align     = "right"
     29
     30     showlives     = true
     31     showplayers     = false
     32    /-->
     33
     34    <OverlayText
     35     position  = "0.02, 0.02"
     36     pickpoint = "0.0, 0.0"
     37     font      = "ShareTechMono"
     38     textsize  = 0.04
     39     colour    = "1.0, 1.0, 1.0, 1.0"
     40     align     = "left"
     41     caption   = "Lives:   "
     42    />
     43
     44    <OverlayText
     45     position  = "0.02, 0.055"
     46     pickpoint = "0.0, 0.0"
     47     font      = "ShareTechMono"
     48     textsize  = 0.04
     49     colour    = "1.0, 1.0, 1.0, 1.0"
     50     align     = "left"
     51     caption   = "Players: "
     52    />
     53
     54    <OverlayText
     55     position  = "0.02, 0.07"
     56     pickpoint = "0.0, 0.0"
     57     font      = "ShareTechMono"
     58     textsize  = 0.04
     59     colour    = "1.0, 1.0, 1.0, 1.0"
     60     align     = "left"
     61     caption   = "__________|"
     62    />
     63
     64    <OverlayText
     65     position  = "0.022, 0.07"
     66     pickpoint = "0.0, 0.0"
     67     font      = "ShareTechMono"
     68     textsize  = 0.04
     69     colour    = "1.0, 1.0, 1.0, 1.0"
     70     align     = "left"
     71     caption   = "__________"
     72    />
     73
     74    <OverlayText
     75     position  = "0.1733, 0.038"
     76     pickpoint = "0.0, 0.0"
     77     font      = "ShareTechMono"
     78     textsize  = 0.04
     79     colour    = "1.0, 1.0, 1.0, 1.0"
     80     align     = "left"
     81     caption   = "|"
     82    />
     83
    2284  </OverlayGroup>
    2385</Template>
  • code/branches/lastmanstanding/src/modules/overlays/hud/CMakeLists.txt

    r7163 r7635  
    1515  GametypeStaticMessage.cc
    1616  GametypeFadingMessage.cc
     17  LastManStandingInfos.cc
    1718)
  • code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.cc

    r7617 r7635  
    147147    }
    148148
     149    int LastManStanding::pawnGetLives(Pawn* pawn)
     150    {
     151        if(!pawn)
     152            return -1;
     153        PlayerInfo* player= dynamic_cast<PlayerInfo*>(pawn);
     154        if(!player)
     155            return -2;
     156        return playerLives_[player];
     157    }
     158
     159    const int LastManStanding::playerGetLives(PlayerInfo* player)
     160    {
     161        if (player)
     162            return  playerLives_[player];
     163        else
     164            return 0;
     165    }
    149166
    150167    void LastManStanding::playerEntered(PlayerInfo* player)
     
    224241    }
    225242
    226     const int LastManStanding::playerGetLives(PlayerInfo* player)
    227     {
    228         if (player)
    229             return  playerLives_[player];
    230         else
    231             return 0;
    232     }
    233 
    234243    void LastManStanding::punishPlayer(PlayerInfo* player)
    235244    {
  • code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.h

    r7617 r7635  
    7373
    7474            virtual void end(); //!< Sends an end message.
     75            virtual int pawnGetLives(Pawn* pawn); //!< Returns amount of Lives of a certain player.
     76            const int playerGetLives(PlayerInfo* player); //!< getFunction for the map "playerLives_".
    7577            virtual void playerEntered(PlayerInfo* player); //!< Initializes values. Manages the gametype's HUD. #Players alive via StaticMessage.
    7678            virtual bool playerLeft(PlayerInfo* player); //!< Manages the gametype's HUD. #Players alive via StaticMessage.
     
    7880            virtual void playerStopsControllingPawn(PlayerInfo* player, Pawn* pawn);  //!< Manages the gametype's HUD. #Players alive via StaticMessage.
    7981
    80             const int playerGetLives(PlayerInfo* player); //!< getFunction for the map "playerLives_".
    8182            void punishPlayer(PlayerInfo* player); //!< Function in order to kill a player. Punishment for hiding longer than "timeRemaining".
    8283            void tick (float dt); //!< used to end the game
Note: See TracChangeset for help on using the changeset viewer.