예제 #1
0
 private void LogDebug(string message)
 {
     if (logger != null)
     {
         logger.Debug(message);
     }
 }
        public void Handle(PlayerNpcActionResponse data, IRavenNetworkConnection connection, SendOption sendOption)
        {
            logger.Debug("PlayerNpcActionResponseHandler::Handle");
            Debug.Log("PlayerNpcActionResponseHandler::Handle");
            var playerHandler = moduleManager.GetModule <PlayerHandler>();

            playerHandler.NpcAction(data.PlayerId, data.NpcServerId, data.ActionId, data.ParameterId, data.Status);
        }
        public void Handle(PlayerMoveResponse data, IRavenNetworkConnection connection, SendOption sendOption)
        {
            logger.Debug("PlayerMoveResponseHandler::Handle");
            Debug.Log("PlayerMoveResponseHandler::Handle");
            var playerHandler = moduleManager.GetModule <PlayerHandler>();

            playerHandler.Move(data.PlayerId, data.Position, data.Destination, data.Running);
        }
예제 #4
0
        public bool Connect(IPAddress address, int port)
        {
            lock (connectionMutex)
            {
                if (client.Connect(address, port))
                {
                    logger.Debug("Connected to FS");
                    return(true);
                }

                logger.Error("Unable to connect to server.");
                return(false);
            }
        }