Changeset 9248 in orxonox.OLD for branches/proxy/src/lib/network/network_game_manager.h
- Timestamp:
- Jul 12, 2006, 10:35:26 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/network_game_manager.h
r8708 r9248 42 42 43 43 /*! 44 * a class that can create and remove entities 44 * a class that can create and remove entities over the network 45 45 */ 46 46 class NetworkGameManager: public Synchronizeable 47 47 { 48 48 49 public: 49 50 virtual ~NetworkGameManager(); 50 51 51 52 static NetworkGameManager* NetworkGameManager::getInstance() 52 53 { if (!NetworkGameManager::singletonRef) NetworkGameManager::singletonRef = new NetworkGameManager(); return NetworkGameManager::singletonRef; } … … 55 56 bool signalNewPlayer( int userId ); 56 57 bool signalLeftPlayer( int userID ); 57 58 void removeSynchronizeable( int uniqueId ); 59 58 60 59 void prefereTeam( int teamId ); 60 61 61 62 62 inline void setGameState( int gameState ){ this->gameState = gameState; } 63 63 inline int getGameState(){ return this->gameState; } 64 64 65 65 void tick( float ds ); 66 66 67 void removeSynchronizeable( int uniqueId ); 67 68 void sendChatMessage( const std::string & message, int messageType ); 69 68 70 69 71 private: 70 72 NetworkGameManager(); 71 73 72 74 static bool delSynchronizeableHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId ); 73 75 static bool preferedTeamHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId ); 74 76 static bool chatMessageHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId ); 75 77 76 78 void setPreferedTeam( int userId, int teamId ); 77 79 80 81 private: 78 82 static NetworkGameManager* singletonRef; 79 83 80 84 int gameState; 81 85 82 86 std::list<Playable*> playablesToDelete; 83 87 };
Note: See TracChangeset
for help on using the changeset viewer.