Gruppe22.Client.NetPlayer.NetPlayer C# (CSharp) Method

NetPlayer() public method

public NetPlayer ( Backend parent ) : System
parent Backend
return System
        public NetPlayer(Backend.IHandleEvent parent)
        {
            _config = new NetPeerConfiguration("DungeonCrawler");
            _config.EnableMessageType(NetIncomingMessageType.DiscoveryResponse);
            _config.EnableMessageType(NetIncomingMessageType.ConnectionApproval);

            _config.UseMessageRecycling = true;
            _config.PingInterval = 0.25f;
            _config.ConnectionTimeout = 20f;
            _config.MaximumHandshakeAttempts = 3;
            _config.ResendHandshakeInterval = 5;
            _parent = parent;
            _servers = new Dictionary<string, string>();
            Start();
        }