/*! * @file game_rules.h * Defines game rules for this game */ #ifndef _GAME_RULES_H #define _GAME_RULES_H #include "base_object.h" class TiXmlElement; class ObjectManager; class Player; class GameRules : public BaseObject { public: GameRules(const TiXmlElement* root); virtual ~GameRules(); virtual void loadParams(const TiXmlElement* root = NULL); virtual void onPlayerSpawn(Player* player) {} virtual void onPlayerDeath(Player* player) {} virtual void tick(float dt) = 0; /** draws the stuff from the game rules if there is any need to */ void draw() {} protected: virtual void checkGameRules() {} protected: ObjectManager* pObjectManager; //!< reference to the current Object Manager Player* localPlayer; //!< reference to the local player }; #endif /* _GAME_RULES_H */