本文整理汇总了C#中RemoteClient.disconnect方法的典型用法代码示例。如果您正苦于以下问题:C# RemoteClient.disconnect方法的具体用法?C# RemoteClient.disconnect怎么用?C# RemoteClient.disconnect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RemoteClient
的用法示例。
在下文中一共展示了RemoteClient.disconnect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConnectAndInit
// Connect to DF, fetch initial data, start things running
void ConnectAndInit()
{
blockRequest = new RemoteFortressReader.BlockRequest();
blockRequest.blocks_needed = BlocksToFetch;
pendingBlocks = new Util.UniqueQueue<DFCoord, RemoteFortressReader.MapBlock>();
networkClient = new DFHack.RemoteClient(dfNetworkOut);
bool success = networkClient.connect();
if (!success)
{
networkClient.disconnect();
networkClient = null;
throw new UnityException("DF Connection Failure");
}
BindMethods();
FetchUnchangingInfo();
networkClient.suspend_game();
viewInfoCall.execute(null, out _netViewInfo);
unitListCall.execute(null, out _netUnitList);
worldMapCall.execute(null, out _netWorldMap);
regionMapCall.execute(null, out _netRegionMaps);
networkClient.resume_game();
mapResetCall.execute();
InitStatics();
foreach (System.Action callback in connectionCallbacks)
{
callback.Invoke();
}
connectionCallbacks.Clear();
connectionMode = ConnectionMode.GetConnectionMode(this, RunOnAlternateThread);
}