5#include "CoreMinimal.h"
6#include "Components/ActorComponent.h"
8#include "TutorialComponent.generated.h"
11UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
12class ONEPIECE_API UTutorialComponent :
public UActorComponent
22 virtual
void BeginPlay() override;
26 virtual
void TickComponent(
float DeltaTime, ELevelTick TickType,
27 FActorComponentTickFunction* ThisTickFunction) override;
31 UPROPERTY(BlueprintReadOnly, Category = "Tutorial")
34 UFUNCTION(BlueprintCallable, Category = "Tutorial")
37 UFUNCTION(BlueprintCallable, Category = "Tutorial")
38 void AdvanceToNextStep();
40 UFUNCTION(BlueprintCallable, Category = "Tutorial")
43 UFUNCTION(BlueprintCallable, Category = "Tutorial")
44 bool IsTutorialCompleted() const;
48 void CheckInputConditions();
49 void OnInputConditionMet();
51 bool bInputConditionMet = false;
53 FTimerHandle AdvanceDelayTimerHandle;
59 bool CheckMouseLookInput() const;
60 bool CheckMovementInput() const;
61 bool CheckSprintInput() const;
62 bool CheckJumpInput() const;
63 bool CheckPickUpInput() const;
64 bool CheckGrabGunInput() const;
65 bool CheckInteractionInput() const;
71 APlayerController* OwnerController;
74 FRotator LastControlRotation;
79 void OnObjectGrabbed(AActor* GrabbedObject);
81 void OnObjectPickedUp(AActor* PickedObject);
83 void OnObjectInteracted(AActor* InteractedObject);
87 bool bGrabbedLuggage = false;
88 bool bPickedUpSomething = false;
89 bool bInteractedWithSwitch = false;