Changeset 2844 for code/branches/gui/src/orxonox/gamestates/GSClient.cc
- Timestamp:
- Mar 25, 2009, 5:23:00 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/gamestates/GSClient.cc
r2817 r2844 35 35 #include "core/Core.h" 36 36 #include "network/Client.h" 37 #include "core/Game.h" 37 38 38 39 namespace orxonox 39 40 { 41 AddGameState(GSClient, "client"); 42 40 43 SetCommandLineArgument(ip, "127.0.0.1").information("#.#.#.#"); 41 44 42 GSClient::GSClient( )43 : GameState( "client")45 GSClient::GSClient(const std::string& name) 46 : GameState(name) 44 47 , client_(0) 45 48 { … … 50 53 } 51 54 52 void GSClient:: enter()55 void GSClient::activate() 53 56 { 54 57 Core::setIsClient(true); … … 59 62 ThrowException(InitialisationFailed, "Could not establish connection with server."); 60 63 61 GSLevel::enter();62 63 64 client_->update(Core::getGameClock()); 64 65 } 65 66 66 void GSClient:: leave()67 void GSClient::deactivate() 67 68 { 68 GSLevel::leave();69 70 69 client_->closeConnection(); 71 70 … … 76 75 } 77 76 78 void GSClient:: ticked(const Clock& time)77 void GSClient::update(const Clock& time) 79 78 { 80 GSLevel::ticked(time);81 79 client_->update(time); 82 83 this->tickChild(time);84 80 } 85 81 }
Note: See TracChangeset
for help on using the changeset viewer.