/////////////////////////////////////////// public GameNetworkClient(bool entitySystemServiceEnabled) { if (instance != null) Log.Fatal("GameNetworkClient.GameNetworkClient: instance != null."); instance = this; //register network services //register user management service userManagementService = new UserManagementClientNetworkService(); RegisterService(userManagementService); //register custom messages service customMessagesService = new CustomMessagesClientNetworkService(); RegisterService(customMessagesService); //register chat service chatService = new ChatClientNetworkService(userManagementService); RegisterService(chatService); //register entity system service if (entitySystemServiceEnabled) { entitySystemService = new EntitySystemClientNetworkService(userManagementService); RegisterService(entitySystemService); } }
/////////////////////////////////////////// public GameNetworkClient(bool entitySystemServiceEnabled) { if (instance != null) { Log.Fatal("GameNetworkClient.GameNetworkClient: instance != null."); } instance = this; //register network services //register user management service userManagementService = new UserManagementClientNetworkService(); RegisterService(userManagementService); //register custom messages service customMessagesService = new CustomMessagesClientNetworkService(); RegisterService(customMessagesService); //register chat service chatService = new ChatClientNetworkService(userManagementService); RegisterService(chatService); //register entity system service if (entitySystemServiceEnabled) { entitySystemService = new EntitySystemClientNetworkService(userManagementService); RegisterService(entitySystemService); } }
private void ChatService_ReceiveText(ChatClientNetworkService sender, UserManagementClientNetworkService.UserInfo fromUser, string text) { string userName = fromUser != null ? fromUser.Name : "(null)"; Log("{0}: {1}", userName, text); }
void Client_ChatService_ReceiveText( ChatClientNetworkService sender, UserManagementClientNetworkService.UserInfo fromUser, string text ) { }
private void Client_ChatService_ReceiveText(ChatClientNetworkService sender, UserManagementClientNetworkService.UserInfo fromUser, string text) { string userName = fromUser != null ? fromUser.Name : "(null)"; AddScreenMessage(string.Format("{0}: {1}", userName, text)); }