18 virtual void BeginPlay()
override;
19 virtual void Tick(
float DeltaTime)
override;
20 virtual void GetLifetimeReplicatedProps(TArray<class FLifetimeProperty>& OutLifetimeProps)
const override;
24 UFUNCTION(BlueprintImplementableEvent, Category =
"Holder")
25 void OnActivate(
bool bSuccess);
31 UFUNCTION(NetMulticast, Reliable)
32 void Multicast_ShowResultPopup(int32 CorrectAnswerIndex);
38 UFUNCTION(NetMulticast, Reliable)
39 void Multicast_ShowWrongPopup(const FString& FoodName);
45 void SetAnswerFoodIndex(int32 InAnswerFoodIndex);
49 void OnRep_IsActivated();
52 void OnRep_CurTarget();
58 void OnFoodBoxOverlapBegin(
59 UPrimitiveComponent* OverlappedComponent,
61 UPrimitiveComponent* OtherComp,
64 const FHitResult& SweepResult);
71 bool CheckFood(class
AFood* TargetFood);
72 void CheckPartialAnswer(const struct
FFoodCapsuleData& TargetData,
bool& bOutCityCorrect,
bool& bOutFoodCorrect);
74 void UpdateActivateState(
bool State);
78 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
79 TObjectPtr<class UBoxComponent> BoxCollision;
81 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
82 TObjectPtr<class USkeletalMeshComponent> MeshComponent;
84 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Spawning")
85 TObjectPtr<class USceneComponent> HoldPos;
87 UPROPERTY(EditAnywhere, BlueprintReadWrite)
96 UPROPERTY(ReplicatedUsing=OnRep_CurTarget)
97 TObjectPtr<class AActor> CurTarget;
100 UPROPERTY(ReplicatedUsing=OnRep_IsActivated, VisibleAnywhere, BlueprintReadOnly, Category = "State")
101 bool bIsActivated = false;
104 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Visual")
105 float ActivatedHeightOffset = 50.0f;
107 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Visual")
108 float RotationSpeed = 90.0f;
112 int32 AnswerFoodIndex = -1;