Last change
on this file since 8027 was
7810,
checked in by bensch, 19 years ago
|
orxonox/trunk: merged the Weather effects back here
|
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 | |
---|
15 | class TiXmlElement; |
---|
16 | class ObjectManager; |
---|
17 | class Player; |
---|
18 | class ImagePlane; |
---|
19 | |
---|
20 | |
---|
21 | class 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 std::string& 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 | ImagePlane* deathScreen; //!< the death screen |
---|
55 | }; |
---|
56 | |
---|
57 | |
---|
58 | #endif /* _MULTIPLAYER_TEAM_DEATHMATCH_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.