Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 12, 2006, 10:35:26 AM (18 years ago)
Author:
patrick
Message:

starting switch to multiple server states (proxy, master, client,..)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/network_game_manager.h

    r8708 r9248  
    4242
    4343/*!
    44  * a class that can create and remove entities
     44 * a class that can create and remove entities over the network
    4545 */
    4646class NetworkGameManager: public Synchronizeable
    4747{
     48
    4849  public:
    4950    virtual ~NetworkGameManager();
    50    
     51
    5152    static NetworkGameManager* NetworkGameManager::getInstance()
    5253    { if (!NetworkGameManager::singletonRef) NetworkGameManager::singletonRef = new NetworkGameManager(); return NetworkGameManager::singletonRef; }
     
    5556    bool signalNewPlayer( int userId );
    5657    bool signalLeftPlayer( int userID );
    57    
    58     void removeSynchronizeable( int uniqueId );
    59    
     58
    6059    void prefereTeam( int teamId );
     60
    6161
    6262    inline void setGameState( int gameState ){ this->gameState = gameState; }
    6363    inline int getGameState(){ return this->gameState; }
    64    
     64
    6565    void tick( float ds );
    66    
     66
     67    void removeSynchronizeable( int uniqueId );
    6768    void sendChatMessage( const std::string & message, int messageType );
     69
    6870
    6971  private:
    7072    NetworkGameManager();
    71    
     73
    7274    static bool delSynchronizeableHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId );
    7375    static bool preferedTeamHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId );
    7476    static bool chatMessageHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId );
    75    
     77
    7678    void setPreferedTeam( int userId, int teamId );
    7779
     80
     81  private:
    7882    static NetworkGameManager*    singletonRef;
    79    
     83
    8084    int                           gameState;
    81    
     85
    8286    std::list<Playable*>          playablesToDelete;
    8387};
Note: See TracChangeset for help on using the changeset viewer.