Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

NON-compiling version. Work in Progress.

Location:
code/branches/lastmanstanding/src/orxonox/gametypes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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.