4#include "GameFramework/GameModeBase.h"
9 PrimaryActorTick.bCanEverTick =
true;
10 Story = CreateDefaultSubobject<UStoryComponent>(TEXT(
"StoryComponent"));
12 HighlightComponent = CreateDefaultSubobject<UHighlightComponent>(
"HighlightComponent");
21void ABaseStoryActor::StepSkipped_Implementation(
FStoryStep SkippedStep,
bool IsForward)
25void ABaseStoryActor::OnHintActivated_Implementation(
bool Activate)
35 bool ItemFounded =
false;
47void ABaseStoryActor::ActivateHighlightOnActiveStep_Implementation()
49 bool ItemFounded =
false;
80 FTimerDelegate HighlightActivateDelegate;
81 HighlightActivateDelegate.BindUFunction(
this,
"ActivateHighlightOnActiveStep");
82 GetWorld()->GetTimerManager().SetTimerForNextTick(HighlightActivateDelegate);
85 GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red,
"HighlightComponent IsNotValid");
88 if (GetLocalRole() == ROLE_Authority && GetWorld()->GetAuthGameMode()->GetClass()->ImplementsInterface(UPixoCoreInterface::StaticClass()))
90 HintManager = Cast<UHintManager>(IPixoCoreInterface::Execute_GetManagerRef(GetWorld()->GetAuthGameMode(), UHintManager::StaticClass()));
112 GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red,
"HighlightComponent IsNotValid");
UStoryComponent * Story
UPROPERTY(BlueprintReadWrite, EditAnywhere)
void NewStepActivated(FStoryStep NewStep, bool IsForward)
Callback function for when a new step is activated.
void OnHintActivated(bool Activate)
Event called when a hint is activated.
virtual bool IsObjectActive_Implementation() override
Implementation of the IsObjectActive function from the IPixoVRStoryObject interface.
void NewSubStepActivated(FStoryStep NewSubStep)
Callback function for when a new substep is activated.
void ActivateHighlightOnActiveStep()
Event called to activate the highlight on the active step.
virtual void BeginPlay() override
UHintManager * HintManager
UPROPERTY(BlueprintReadWrite)
UHighlightComponent * HighlightComponent
UPROPERTY(EditAnywhere, BlueprintReadWrite)
void StepSkipped(FStoryStep SkippedStep, bool IsForward)
Event called when a step is skipped.
bool AlwaysEmissiveHighlight
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")
FTimerHandle PulseHighlightTimerHandle
UPROPERTY(BlueprintReadWrite)
bool DeactivateHighlightOnEachInactiveStep
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Highlight")
void ActivatePulseHighlight(bool Activate)
Activates or deactivates the pulse highlight effect.
bool ActivateHighlightOnEachStep
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")
bool UseIsObjectActiveInsteadOfActiveSteps
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")
FOnHintActivated OnHintActivated
Event delegate for hint activation.
bool ObjectActive
UPROPERTY(BlueprintReadWrite)
UStoryManager * StoryManager
UPROPERTY(BlueprintReadWrite)
FOnStepSkipped OnStepSkipped
UPROPERTY(BlueprintAssignable, Category = "Story Delegate")
FOnNewStep OnNewStep
UPROPERTY(BlueprintAssignable, Category = "Story Delegate")
FStoryStep CurrentSubStep
UPROPERTY(BlueprintReadWrite, Replicated)
FOnNewSubStep OnNewSubStep
UPROPERTY(BlueprintAssignable, Category = "Story Delegate")
FStoryStep CurrentStep
UPROPERTY(BlueprintReadWrite, Replicated)
FText StepName
UPROPERTY(BlueprintReadWrite, EditAnywhere)