5#include "CoreMinimal.h"
7#include "Engine/EngineTypes.h"
8#include "Kismet/KismetMathLibrary.h"
9#include "Door.generated.h"
19class UPrimitiveComponent;
29 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Components", meta = (AllowPrivateAccess =
true))
30 class UStaticMeshComponent* DoorMesh;
31 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Components", meta = (AllowPrivateAccess =
true))
32 class UBoxComponent* Inside;
33 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Components", meta = (AllowPrivateAccess =
true))
34 class UBoxComponent* DoorCollisionAndNavigationBlocker;
35 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Components", meta = (AllowPrivateAccess =
true))
36 class UBoxComponent* Outside;
37 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Components", meta = (AllowPrivateAccess =
true))
38 class USceneComponent* DoorHinge;
39 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Components", meta = (AllowPrivateAccess =
true))
40 class USceneComponent* DoorRoot;
41 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Components", meta = (AllowPrivateAccess =
true))
42 class UInteractableComponent* Interactable;
47 void OnSelected(APlayerController* Sender,
class UPrimitiveComponent* Component);
49 void OnInsideOfDoor(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
51 void OnOutsideOfDoor(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
54 virtual void BeginPlay()
override;
55 virtual void SetState(AController* Sender,
const uint8 NewState,
bool bIsFromInit =
false);
59 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category =
"Door Config")
60 FText OpenDoorText = NSLOCTEXT("
ProjectX", "cmd_opendoor", "
Open Door");
62 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Door Config")
63 FText CloseDoorText = NSLOCTEXT("
ProjectX", "cmd_closedir", "
Close Door");
65 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Door Config")
66 float InsideDegreesOpen = 90.0f;
68 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Door Config")
69 float OutsideDegreesOpen = -90.0f;
71 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Door Config")
74 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Door Config")
75 TEnumAsByte<EEasingFunc::Type> DoorAnimationEaseType;
77 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Door Config")
78 float DoorOpenInterpolationTime = 0.25f;
80 virtual uint8 GetStateCount() const override;
82 UFUNCTION(BlueprintCallable, Category = "State Functions")
83 void AnimateDoor(const
float InterpDegrees, const
bool bIsFromInit = false);
EDoorState
Definition: Door.h:13
Definition: ManagedStateActor.h:21
Definition: ProjectX.Build.cs:6