Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/shared_lib/src/util/multiplayer_team_deathmatch.h @ 7211

Last change on this file since 7211 was 7044, checked in by patrick, 19 years ago

trunk: death screen now works

File size: 1.5 KB
Line 
1
2/*!
3 * @file multiplayer_team_deathmatch.h
4 * Defines game rules for team deathmatch games
5 *
6 * currently there are only two teams supported
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;
18class Billboard;
19
20
21class MultiplayerTeamDeathmatch : public GameRules
22{
23
24  public:
25    MultiplayerTeamDeathmatch(const TiXmlElement* root = NULL);
26    virtual ~MultiplayerTeamDeathmatch();
27
28    virtual void loadParams(const TiXmlElement* root);
29
30
31    virtual void onPlayerSpawn();
32    virtual void onPlayerDeath();
33
34
35    virtual void tick(float dt);
36    void draw();
37
38    inline void setDeathPenaltyTimeout(float time) { this->deathTimeout = time; }
39    inline void setMaxKills(int kills) { this->maxKills = kills; }
40    void setDeathScreen(const char* imageName);
41
42  protected:
43    virtual void checkGameRules();
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
48    float              timeout;                    //!< time counted if player dead
49    int                maxKills;                   //!< max kills for winning condition
50
51    int                teamAKills;                 //!< kills of team A
52    int                teamBKills;                 //!< kills of team B
53
54    Billboard*         deathScreen;                //!< the death screen
55};
56
57
58#endif /* _MULTIPLAYER_TEAM_DEATHMATCH_H */
Note: See TracBrowser for help on using the repository browser.