Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7034 in orxonox.OLD for trunk/src/util


Ignore:
Timestamp:
Feb 5, 2006, 9:56:04 PM (19 years ago)
Author:
patrick
Message:

trunk: started working on the game rules and specificlay on the multiplayer game rules

Location:
trunk/src/util
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/Makefile.am

    r7020 r7034  
    1010                        hud.cc \
    1111                        game_rules.cc \
     12                        multiplayer_team_deathmatch.cc \
    1213                        animation/animation3d.cc \
    1314                        animation/animation.cc \
     
    2627                        hud.h \
    2728                        game_rules.h \
     29                        multiplayer_team_deathmatch.h \
    2830                        animation/animation3d.h \
    2931                        animation/animation.h \
  • trunk/src/util/game_rules.h

    r7020 r7034  
    1313class TiXmlElement;
    1414class ObjectManager;
     15class Player;
    1516
    1617
     
    2526
    2627
    27     virtual void tick(float dt) = 0;
     28    virtual void onPlayerSpawn(Player* player) {}
     29    virtual void onPlayerDeath(Player* player) {}
    2830
    2931
    30   private:
     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:
    3142    ObjectManager*         pObjectManager;         //!< reference to the current Object Manager
     43    Player*                localPlayer;            //!< reference to the local player
    3244};
    3345
Note: See TracChangeset for help on using the changeset viewer.