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


C++ IsPendingKill函数代码示例

本文整理汇总了C++中IsPendingKill函数的典型用法代码示例。如果您正苦于以下问题:C++ IsPendingKill函数的具体用法?C++ IsPendingKill怎么用?C++ IsPendingKill使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: EndTask

void UAbilityTask::EndTask()
{
	if (!IsPendingKill())
	{
		OnDestroy(false);
	}
}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:7,代码来源:AbilityTask.cpp

示例2: GetCharacterMovement

void AMech_RPGCharacter::BeginPlay() {
	Super::BeginPlay();
	GetCharacterMovement()->SetAvoidanceEnabled(true);
	if (IsPendingKill()) {
		return;
	}

	if (!UseLoadout) {
		//CreatePresetRole(StartingRole());
	}
	else {
		SetupWithLoadout();
	}

	if (abilities.Num() > 0) {
		SetCurrentAbility(abilities[0]);
	}

	//SetUpGroup();
	SetUpWidgets();

	if (OnPostBeginPlay.IsBound()) {
		OnPostBeginPlay.Broadcast(this);
	}
}
开发者ID:belven,项目名称:Mech_RPG,代码行数:25,代码来源:Mech_RPGCharacter.cpp

示例3: PostInitializeComponents

void APawn::PostInitializeComponents()
{
	Super::PostInitializeComponents();
	
	if (!IsPendingKill())
	{
		GetWorld()->AddPawn( this );

		// Automatically add Controller to AI Pawns if we are allowed to.
		if (AutoPossessPlayer == EAutoReceiveInput::Disabled)
		{
			if (AutoPossessAI != EAutoPossessAI::Disabled && Controller == NULL && GetNetMode() != NM_Client)
			{
				const bool bPlacedInWorld = (GetWorld()->bStartup);
				if ((AutoPossessAI == EAutoPossessAI::PlacedInWorldOrSpawned) ||
					(AutoPossessAI == EAutoPossessAI::PlacedInWorld && bPlacedInWorld) ||
					(AutoPossessAI == EAutoPossessAI::Spawned && !bPlacedInWorld))
				{
					SpawnDefaultController();
				}
			}
		}

		// update movement component's nav agent values
		UpdateNavAgent();
	}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:27,代码来源:Pawn.cpp

示例4: GetMesh

void ABaseCharacter::SetRagdollPhysics()
{
	USkeletalMeshComponent* Mesh3P = GetMesh();
	if (Mesh3P)
	{
		Mesh3P->SetCollisionProfileName(TEXT("Ragdoll"));
	}
	SetActorEnableCollision(true);

	if (!IsPendingKill() || Mesh3P || Mesh3P->GetPhysicsAsset())
	{
		Mesh3P->SetAllBodiesSimulatePhysics(true);
		Mesh3P->SetSimulatePhysics(true);
		Mesh3P->WakeAllRigidBodies();
		Mesh3P->bBlendPhysics = true;

		SetLifeSpan(TimeAfterDeathBeforeDestroy);
	}
	else
	{
		// Immediately hide the pawn
		TurnOff();
		SetActorHiddenInGame(true);
		SetLifeSpan(1.0f);
	}

	UCharacterMovementComponent* CharacterComp = Cast<UCharacterMovementComponent>(GetMovementComponent());
	if (CharacterComp)
	{
		CharacterComp->StopMovementImmediately();
		CharacterComp->DisableMovement();
		CharacterComp->SetComponentTickEnabled(false);
	}
}
开发者ID:1992please,项目名称:Unreal_ShooterGame,代码行数:34,代码来源:BaseCharacter.cpp

示例5: checkf

void UActorComponent::DoDeferredRenderUpdates_Concurrent()
{
	checkf(!HasAnyFlags(RF_Unreachable), TEXT("%s"), *GetFullName());
	checkf(!IsTemplate(), TEXT("%s"), *GetFullName());
	checkf(!IsPendingKill(), TEXT("%s"), *GetFullName());

	if(!IsRegistered())
	{
		UE_LOG(LogActorComponent, Log, TEXT("UpdateComponent: (%s) Not registered, Aborting."), *GetPathName());
		return;
	}

	if(bRenderStateDirty)
	{
		SCOPE_CYCLE_COUNTER(STAT_PostTickComponentRecreate);
		RecreateRenderState_Concurrent();
		checkf(!bRenderStateDirty, TEXT("Failed to route CreateRenderState_Concurrent (%s)"), *GetFullName());
	}
	else
	{
		SCOPE_CYCLE_COUNTER(STAT_PostTickComponentLW);
		if(bRenderTransformDirty)
		{
			// Update the component's transform if the actor has been moved since it was last updated.
			SendRenderTransform_Concurrent();
		}

		if(bRenderDynamicDataDirty)
		{
			SendRenderDynamicData_Concurrent();
		}
	}
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:33,代码来源:ActorComponent.cpp

示例6: TEXT

void UPawnActionsComponent::DescribeSelfToVisLog(FVisualLogEntry* Snapshot) const
{
    static const FString Category = TEXT("PawnActions");

    if (IsPendingKill())
    {
        return;
    }

    for (int32 PriorityIndex = 0; PriorityIndex < ActionStacks.Num(); ++PriorityIndex)
    {
        const UPawnAction* Action = ActionStacks[PriorityIndex].GetTop();
        if (Action == NULL)
        {
            continue;
        }

        FVisualLogStatusCategory StatusCategory;
        StatusCategory.Category = Category + TEXT(": ") + GetPriorityName(PriorityIndex);

        while (Action)
        {
            StatusCategory.Add(Action->GetName(), Action->GetStateDescription());
            Action = Action->GetParentAction();
        }

        Snapshot->Status.Add(StatusCategory);
    }
}
开发者ID:didixp,项目名称:Ark-Dev-Kit,代码行数:29,代码来源:PawnActionsComponent.cpp

示例7: PostInitProperties

void ANavigationData::PostInitProperties()
{
	Super::PostInitProperties();

	if (IsPendingKill() == true)
	{
		return;
	}

	if (HasAnyFlags(RF_ClassDefaultObject))
	{
		if (RuntimeGeneration == ERuntimeGenerationType::LegacyGeneration)
		{
			RuntimeGeneration = bRebuildAtRuntime_DEPRECATED ? ERuntimeGenerationType::Dynamic : ERuntimeGenerationType::Static;
		}
	}
	else
	{
		bNetLoadOnClient = (*GEngine->NavigationSystemClass != nullptr) && (GEngine->NavigationSystemClass->GetDefaultObject<UNavigationSystem>()->ShouldLoadNavigationOnClient(this));

		UWorld* WorldOuter = GetWorld();
		
		if (WorldOuter != NULL && WorldOuter->GetNavigationSystem() != NULL)
		{
			WorldOuter->GetNavigationSystem()->RequestRegistration(this);
		}

		RenderingComp = ConstructRenderingComponent();
	}
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:30,代码来源:NavigationData.cpp

示例8: PostInitializeComponents

void ACharacter::PostInitializeComponents()
{
    Super::PostInitializeComponents();

    if (!IsPendingKill())
    {
        if (Mesh)
        {
            BaseTranslationOffset = Mesh->RelativeLocation;
            BaseRotationOffset = Mesh->RelativeRotation.Quaternion();

            // force animation tick after movement component updates
            if (Mesh->PrimaryComponentTick.bCanEverTick && CharacterMovement)
            {
                Mesh->PrimaryComponentTick.AddPrerequisite(CharacterMovement, CharacterMovement->PrimaryComponentTick);
            }
        }

        if (CharacterMovement && CapsuleComponent)
        {
            CharacterMovement->UpdateNavAgent(*CapsuleComponent);
        }

        if (Controller == NULL && GetNetMode() != NM_Client)
        {
            if (CharacterMovement && CharacterMovement->bRunPhysicsWithNoController)
            {
                CharacterMovement->SetDefaultMovementMode();
            }
        }
    }
}
开发者ID:colwalder,项目名称:unrealengine,代码行数:32,代码来源:Character.cpp

示例9: DrawDebugDataDelegate

void AGameplayDebuggerReplicator::DrawDebugDataDelegate(class UCanvas* Canvas, class APlayerController* PC)
{
#if ENABLED_GAMEPLAY_DEBUGGER
	if (GetWorld() == nullptr || IsPendingKill() || Canvas == nullptr || Canvas->IsPendingKill())
	{
		return;
	}

	if (!LocalPlayerOwner || !IsActorTickEnabled())
	{
		return;
	}

	if (Canvas->SceneView != nullptr && !Canvas->SceneView->bIsGameView)
	{
		return;
	}

	if (GetWorld()->bPlayersOnly && Role == ROLE_Authority)
	{
		for (FConstPawnIterator Iterator = GetWorld()->GetPawnIterator(); Iterator; ++Iterator)
		{
			AActor* NewTarget = Cast<AActor>(*Iterator);
			if (NewTarget->IsSelected() && GetSelectedActorToDebug() != NewTarget)
			{
				ServerSetActorToDebug(NewTarget);
			}
		}
	}
	DrawDebugData(Canvas, PC);
#endif
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:32,代码来源:GameplayDebuggerReplicator.cpp

示例10: RegisterTargetDataCallbacks

void UAbilityTask_WaitTargetData::RegisterTargetDataCallbacks()
{
	if (!ensure(IsPendingKill() == false))
	{
		return;
	}

	check(TargetClass);
	check(Ability);

	const AGameplayAbilityTargetActor* CDO = CastChecked<AGameplayAbilityTargetActor>(TargetClass->GetDefaultObject());

	const bool bIsLocallyControlled = Ability->GetCurrentActorInfo()->IsLocallyControlled();
	const bool bShouldProduceTargetDataOnServer = CDO->ShouldProduceTargetDataOnServer;

	// If not locally controlled (server for remote client), see if TargetData was already sent
	// else register callback for when it does get here.
	if (!bIsLocallyControlled)
	{
		// Register with the TargetData callbacks if we are expecting client to send them
		if (!bShouldProduceTargetDataOnServer)
		{
			FGameplayAbilitySpecHandle	SpecHandle = GetAbilitySpecHandle();
			FPredictionKey ActivationPredictionKey = GetActivationPredictionKey();

			//Since multifire is supported, we still need to hook up the callbacks
			AbilitySystemComponent->AbilityTargetDataSetDelegate(SpecHandle, ActivationPredictionKey ).AddUObject(this, &UAbilityTask_WaitTargetData::OnTargetDataReplicatedCallback);
			AbilitySystemComponent->AbilityTargetDataCancelledDelegate(SpecHandle, ActivationPredictionKey ).AddUObject(this, &UAbilityTask_WaitTargetData::OnTargetDataReplicatedCancelledCallback);

			AbilitySystemComponent->CallReplicatedTargetDataDelegatesIfSet(SpecHandle, ActivationPredictionKey );

			SetWaitingOnRemotePlayerData();
		}
	}
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:35,代码来源:AbilityTask_WaitTargetData.cpp

示例11: GetOwner

void UActorComponent::ConsolidatedPostEditChange(const FPropertyChangedEvent& PropertyChangedEvent)
{
	FComponentReregisterContext* ReregisterContext = nullptr;
	if(EditReregisterContexts.RemoveAndCopyValue(this, ReregisterContext))
	{
		delete ReregisterContext;

		AActor* MyOwner = GetOwner();
		if ( MyOwner && !MyOwner->IsTemplate() && PropertyChangedEvent.ChangeType != EPropertyChangeType::Interactive )
		{
			MyOwner->RerunConstructionScripts();
		}
	}
	else
	{
		// This means there are likely some stale elements left in there now, strip them out
		for (auto It(EditReregisterContexts.CreateIterator()); It; ++It)
		{
			if (!It.Key().IsValid())
			{
				It.RemoveCurrent();
			}
		}
	}

	// The component or its outer could be pending kill when calling PostEditChange when applying a transaction.
	// Don't do do a full recreate in this situation, and instead simply detach.
	if( IsPendingKill() )
	{
		// @todo UE4 james should this call UnregisterComponent instead to remove itself from the RegisteredComponents array on the owner?
		ExecuteUnregisterEvents();
		World = NULL;
	}
}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:34,代码来源:ActorComponent.cpp

示例12: AbilityEnded

void UAbilityTask::AbilityEnded()
{
	if (!IsPendingKill())
	{
		OnDestroy(true);
	}
}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:7,代码来源:AbilityTask.cpp

示例13: PostInitializeComponents

void APlayerStart::PostInitializeComponents()
{
	Super::PostInitializeComponents();
	if ( !IsPendingKill()  && GetWorld()->GetAuthGameMode() )
	{
		GetWorld()->GetAuthGameMode()->AddPlayerStart(this);
	}
}
开发者ID:stoneStyle,项目名称:Unreal4,代码行数:8,代码来源:PlayerStart.cpp

示例14: PostInitializeComponents

void AAIController::PostInitializeComponents()
{
	Super::PostInitializeComponents();

	if (bWantsPlayerState && !IsPendingKill() && (GetNetMode() != NM_Client))
	{
		InitPlayerState();
	}
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:9,代码来源:AIController.cpp

示例15: PostEditUndo

void AGroupActor::PostEditUndo()
{
	Super::PostEditUndo();

	if (IsPendingKill())
	{
		GetWorld()->ActiveGroupActors.RemoveSwap(this);
	}
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:9,代码来源:GroupActor.cpp


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