Changeset 7163 for code/trunk/src/libraries/network/Client.h
- Timestamp:
- Aug 11, 2010, 8:55:13 AM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/network/Client.h
r5961 r7163 47 47 48 48 #include "util/UtilPrereqs.h" 49 #include "util/Singleton.h" 49 50 #include "ClientConnection.h" 50 51 #include "GamestateClient.h" 51 52 #include "Host.h" 53 #include "LANDiscovery.h" 54 #include "packet/ServerInformation.h" 52 55 56 // tolua_begin 53 57 namespace orxonox 54 58 { 59 // tolua_end 55 60 /** 56 61 Client *client; … … 60 65 * 61 66 */ 62 class _NetworkExport Client : public Host, public ClientConnection{ 67 class _NetworkExport Client // tolua_export 68 : public Host, protected ClientConnection, public Singleton<Client> 69 { // tolua_export 70 friend class Singleton<Client>; 63 71 public: 64 72 Client(); 65 Client(const std::string& address, int port);66 73 ~Client(); 74 75 static Client* getInstance(){ return singletonPtr_s; } // tolua_export 67 76 68 77 bool establishConnection(); 78 void setDestination( const std::string& serverAddress, unsigned int port ); // tolua_export 69 79 bool closeConnection(); 70 80 bool queuePacket(ENetPacket *packet, int clientID); … … 81 91 virtual bool isServer_(){return false;} 82 92 83 GamestateClient gamestate; 93 static Client* singletonPtr_s; 94 GamestateClient* gamestate; 84 95 bool isSynched_; 85 96 86 97 bool gameStateFailure_; 87 98 float timeSinceLastUpdate_; 88 }; 99 }; // tolua_export 89 100 90 101 91 } 102 } // tolua_export 92 103 93 104 #endif /* _Client_H__ */
Note: See TracChangeset
for help on using the changeset viewer.