Inheritance: ClientNetworkService
        ///////////////////////////////////////////
        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 );
            }
        }
示例#2
0
        ///////////////////////////////////////////

        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);
            }
        }
示例#3
0
 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 ) );
 }
示例#4
0
 void Client_ChatService_ReceiveText( ChatClientNetworkService sender,
     UserManagementClientNetworkService.UserInfo fromUser, string text)
 {
 }
示例#5
0
        void ChatService_ReceiveText( ChatClientNetworkService sender,
			UserManagementClientNetworkService.UserInfo fromUser, string text )
        {
            string userName = fromUser != null ? fromUser.Name : "(null)";
            Log( "{0}: {1}", userName, text );
        }