38 virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps)
const override;
40 virtual void Tick(
float DeltaSeconds)
override;
43 virtual void BeginPlay()
override;
52 UFUNCTION(BlueprintCallable, Category =
"Animation")
62 UFUNCTION(BlueprintCallable, Category = "SpeakStage")
72 UFUNCTION(NetMulticast, Reliable)
76 void OnRep_EyeColor();
79 void OnRep_EyeSightState();
84 void OnInteractionTriggered(class AActor* InteractingActor);
89 void OnOutlineStateChanged(
bool bShouldShowOutline);
94 void OnSpeakStageSpeakerChanged(class APlayerState* NewSpeaker);
97 bool IsInRange(const class APawn* LocalPawn) const;
101 void ChangeEyeColor(FLinearColor newColor);
103 void UpdateEyeSight(const FVector& Start, const FVector& End);
104 void ApplyEyeSight();
109 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
110 TObjectPtr<class USkeletalMeshComponent> MeshComponent;
113 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
114 TObjectPtr<class UStaticMeshComponent> EyeMesh;
117 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
118 TObjectPtr<class UBoxComponent> PlayerDetectionZone;
121 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
122 TObjectPtr<class UStaticMeshComponent> EyeSightComp;
125 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
126 TObjectPtr<class UInteractableComponent> InteractableComp;
129 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Components")
130 TObjectPtr<class UWidgetComponent> WidgetComp;
133 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Transient, Category = "Materials", meta = (AllowPrivateAccess = "true"))
134 TObjectPtr<class UMaterialInstanceDynamic> EyeMaterial;
136 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Transient, Category = "Materials", meta = (AllowPrivateAccess = "true"))
137 TObjectPtr<class UMaterialInstanceDynamic> EyeTraceMaterial;
140 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Animation")
147 UPROPERTY(Transient, ReplicatedUsing = OnRep_EyeColor)
148 FLinearColor ReplicatedEyeColor;
151 UPROPERTY(ReplicatedUsing = OnRep_EyeSightState)
152 FVector ReplicatedEyeSightEnd = FVector::ZeroVector;
154 UPROPERTY(ReplicatedUsing = OnRep_EyeSightState)
155 bool bEyeSightVisible = false;
161 float CurAnimDuration;
163 bool bShowDebugInfo = true;
165 float IndicatorBaseLength = 1.0f;
166 float IndicatorBaseRadius = 1.0f;