Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/shared_lib/src/util/game_rules.h @ 10218

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

trunk: death screen now works

File size: 860 bytes
Line 
1
2/*!
3 * @file game_rules.h
4 * Defines game rules for this game
5 */
6
7#ifndef _GAME_RULES_H
8#define _GAME_RULES_H
9
10#include "base_object.h"
11
12
13class TiXmlElement;
14class ObjectManager;
15class Player;
16
17
18class GameRules : public BaseObject
19{
20
21  public:
22    GameRules(const TiXmlElement* root);
23    virtual ~GameRules();
24
25    virtual void loadParams(const TiXmlElement* root = NULL);
26
27
28    virtual void onPlayerSpawn() {}
29    virtual void onPlayerDeath() {}
30
31
32    virtual void tick(float dt) = 0;
33    /** draws the stuff from the game rules if there is any need to */
34    void draw() {}
35
36
37  protected:
38    virtual void checkGameRules() {}
39
40
41  protected:
42    ObjectManager*         pObjectManager;         //!< reference to the current Object Manager
43    Player*                localPlayer;            //!< reference to the local player
44};
45
46
47#endif /* _GAME_RULES_H */
Note: See TracBrowser for help on using the repository browser.