当前位置: 首页>>代码示例>>C++>>正文


C++ IOnlineSessionPtr::ClearOnDestroySessionCompleteDelegate_Handle方法代码示例

本文整理汇总了C++中IOnlineSessionPtr::ClearOnDestroySessionCompleteDelegate_Handle方法的典型用法代码示例。如果您正苦于以下问题:C++ IOnlineSessionPtr::ClearOnDestroySessionCompleteDelegate_Handle方法的具体用法?C++ IOnlineSessionPtr::ClearOnDestroySessionCompleteDelegate_Handle怎么用?C++ IOnlineSessionPtr::ClearOnDestroySessionCompleteDelegate_Handle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IOnlineSessionPtr的用法示例。


在下文中一共展示了IOnlineSessionPtr::ClearOnDestroySessionCompleteDelegate_Handle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnDestroyForJoinSessionComplete

void UOnlineSessionClient::OnDestroyForJoinSessionComplete(FName SessionName, bool bWasSuccessful)
{
	UE_LOG(LogOnline, Verbose, TEXT("OnDestroyForJoinSessionComplete %s bSuccess: %d"), *SessionName.ToString(), bWasSuccessful);

	IOnlineSessionPtr SessionInt = GetSessionInt();

	if (SessionInt.IsValid())
	{
		SessionInt->ClearOnDestroySessionCompleteDelegate_Handle(OnDestroyForJoinSessionCompleteDelegateHandle);
	}

	if (bWasSuccessful)
	{
		JoinSession(SessionName, CachedSessionResult);
	}

	bHandlingDisconnect = false;
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:18,代码来源:OnlineSessionClient.cpp

示例2: OnDestroyForMainMenuComplete

void UOnlineSessionClient::OnDestroyForMainMenuComplete(FName SessionName, bool bWasSuccessful)
{
	UE_LOG(LogOnline, Verbose, TEXT("OnDestroyForMainMenuComplete %s bSuccess: %d"), *SessionName.ToString(), bWasSuccessful);

	IOnlineSessionPtr SessionInt = GetSessionInt();

	if (SessionInt.IsValid())
	{
		SessionInt->ClearOnDestroySessionCompleteDelegate_Handle(OnDestroyForMainMenuCompleteDelegateHandle);
	}

	UWorld* World = GetWorld();
	UNetDriver* NetDriver = World ? World->GetNetDriver() : nullptr;
		
	// Call disconnect to force us back to the menu level
	GEngine->HandleDisconnect(World, NetDriver);

	bHandlingDisconnect = false;
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:19,代码来源:OnlineSessionClient.cpp

示例3: OnDestroySessionComplete

void UtrnetDemoGameInstance::OnDestroySessionComplete(FName SessionName, bool bWasSuccessful)
{
	GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor::Red, FString::Printf(TEXT("OnDestroySessionComplete %s, %d"), *SessionName.ToString(), bWasSuccessful));

    // Get the SessionInterface from the OnlineSubsystem
    IOnlineSessionPtr Sessions = GetSession();

    if (!Sessions.IsValid())
    {
        return;
    }
    // Clear the Delegate
    Sessions->ClearOnDestroySessionCompleteDelegate_Handle(OnDestroySessionCompleteDelegateHandle);

    // If it was successful, we just load another level (could be a MainMenu!)
    if (bWasSuccessful)
    {
        UGameplayStatics::OpenLevel(GetWorld(), "Startup", true);
    }
}
开发者ID:erichen,项目名称:trnetdemo,代码行数:20,代码来源:trnetDemoGameInstance.cpp

示例4: OnDestroySessionComplete

// Destroy Session And return to Start Map
void URadeGameInstance::OnDestroySessionComplete(FName SessionName, bool bWasSuccessful)
{
	// Get the OnlineSubsystem we want to work with
	IOnlineSubsystem* OnlineSub = IOnlineSubsystem::Get();
	if (OnlineSub)
	{
		// Get the SessionInterface from the OnlineSubsystem
		IOnlineSessionPtr Sessions = OnlineSub->GetSessionInterface();

		if (Sessions.IsValid())
		{
			// Clear the Delegate
			Sessions->ClearOnDestroySessionCompleteDelegate_Handle(OnDestroySessionCompleteDelegateHandle);

			// If it was successful, we just load another level (could be a MainMenu!)
			if (bWasSuccessful)
			{
				UGameplayStatics::OpenLevel(GetWorld(), "SelectMap", true);
			}
		}
	}
}
开发者ID:ZioYuri78,项目名称:Rade,代码行数:23,代码来源:RadeGameInstance.cpp


注:本文中的IOnlineSessionPtr::ClearOnDestroySessionCompleteDelegate_Handle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。