Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/util/multiplayer_team_deathmatch.h @ 7970

Last change on this file since 7970 was 7810, checked in by bensch, 18 years ago

orxonox/trunk: merged the Weather effects back here

File size: 1.5 KB
RevLine 
[7034]1
2/*!
[7035]3 * @file multiplayer_team_deathmatch.h
[7037]4 * Defines game rules for team deathmatch games
5 *
6 * currently there are only two teams supported
[7034]7 */
8
9#ifndef _MULTIPLAYER_TEAM_DEATHMATCH_H
10#define _MULTIPLAYER_TEAM_DEATHMATCH_H
11
12#include "game_rules.h"
13
14
15class TiXmlElement;
16class ObjectManager;
17class Player;
[7810]18class ImagePlane;
[7034]19
20
21class MultiplayerTeamDeathmatch : public GameRules
22{
23
24  public:
[7035]25    MultiplayerTeamDeathmatch(const TiXmlElement* root = NULL);
[7034]26    virtual ~MultiplayerTeamDeathmatch();
27
28    virtual void loadParams(const TiXmlElement* root);
29
30
[7044]31    virtual void onPlayerSpawn();
32    virtual void onPlayerDeath();
[7034]33
34
35    virtual void tick(float dt);
36    void draw();
37
[7037]38    inline void setDeathPenaltyTimeout(float time) { this->deathTimeout = time; }
39    inline void setMaxKills(int kills) { this->maxKills = kills; }
[7221]40    void setDeathScreen(const std::string& imageName);
[7034]41
42  protected:
[7035]43    virtual void checkGameRules();
[7037]44
45  private:
46    bool               bLocalPlayerDead;           //!< true if the local player is dead
47    float              deathTimeout;               //!< timeout a player cannot play if he/she dies
[7039]48    float              timeout;                    //!< time counted if player dead
[7037]49    int                maxKills;                   //!< max kills for winning condition
50
51    int                teamAKills;                 //!< kills of team A
52    int                teamBKills;                 //!< kills of team B
[7039]53
[7810]54    ImagePlane*         deathScreen;                //!< the death screen
[7034]55};
56
57
58#endif /* _MULTIPLAYER_TEAM_DEATHMATCH_H */
Note: See TracBrowser for help on using the repository browser.