Exemplo n.º 1
0
void AShooterGameMode::InitGame(const FString& MapName, const FString& Options, FString& ErrorMessage)
{
	const int32 BotsCountOptionValue = GetIntOption(Options, GetBotsCountOptionName(), 0);
	SetAllowBots(BotsCountOptionValue > 0 ? true : false, BotsCountOptionValue);	
	Super::InitGame(MapName, Options, ErrorMessage);

	const UGameInstance* GameInstance = GetGameInstance();
	if (GameInstance && Cast<UShooterGameInstance>(GameInstance)->GetIsOnline())
	{
		bPauseable = false;
	}
}
Exemplo n.º 2
0
void ALabyrinthGameMode::InitGame(const FString& MapName, const FString& Options, FString& ErrorMessage)
{
	const int32 BotsCountOptionValue = GetIntOption(Options, GetBotsCountOptionName(), 0);
	SetAllowBots(BotsCountOptionValue > 0 ? true : false, BotsCountOptionValue);
	Super::InitGame(MapName, Options, ErrorMessage);

	// TO-DO: Create a ULabyrinthGameInstance class
	/*const UGameInstance* GI = GetGameInstance();
	if (GI && Cast<ULabyrinthGameInstance>(GI)->GetIsOnline())
	{
		bPauseable = false;
	}*/
}