Pickup Objective Actor

在角色的头文件中,添加一个布尔变量,设为共有状态,用来判断是否携带目标物体,并暴露给蓝图,类型为仅蓝图可读

    UPROPERTY(BlueprintReadOnly,Category="Gameplay")
    bool bIsCarryingObjective;

当NotifyActorBeginOverlap发生时,检查是否与FPSCharacter中的角色发生重叠

AFPSCharacter* MyCharacter = Cast<AFPSCharacter>(OtherActor);
    if (MyCharacter)
    {
        MyCharacter->bIsCarryingObjective = true;

        Destroy();
    }

 

上一篇:Combinatorial optimization and reasoning with graph neural networks 翻译


下一篇:论文学习Learning from Context or Names? An Empirical Study on Neural Relation Extraction