bool UWorld::IsPaused() { // pause if specifically set or if we're waiting for the end of the tick to perform streaming level loads (so actors don't fall through the world in the meantime, etc) AWorldSettings* Info = GetWorldSettings(); return ( (Info->Pauser != NULL && TimeSeconds >= PauseDelay) || (bRequestedBlockOnAsyncLoading && GetNetMode() == NM_Client) || (GEngine->ShouldCommitPendingMapChange(this)) || (IsPlayInEditor() && bDebugPauseExecution) ); }
void AOnlineArenaGameMode::DefaultTimer() { const auto World = GetWorld(); if (nullptr != World && World->IsPlayInEditor()) { //!< PIE ‚Ì�ê�‡ if (MatchState::WaitingToStart == GetMatchState()) { StartMatch(); } } else { const auto MatchSteate = GetMatchState(); const auto GS = Cast<AOnlineGameState>(GameState); if (nullptr != GS) { --GS->RemainingTime; if (GS->RemainingTime <= 0) { GEngine->AddOnScreenDebugMessage(-1, 1.0f, FColor::Red, TEXT("TIME UP")); if (MatchState::WaitingPostMatch == MatchState) { RestartGame(); } else if (MatchState::InProgress == MatchState) { EndMatch(); } } else { GEngine->AddOnScreenDebugMessage(-1, 1.0f, FColor::Red, FString::FromInt(GS->RemainingTime)); if (MatchState::WaitingToStart == MatchState) { StartMatch(); } } } } }