27 virtual void Tick(
float DeltaTime)
override;
28 virtual void SetupPlayerInputComponent(
class UInputComponent* PlayerInputComponent)
override;
30 virtual void OnPawnSpawned()
override;
33 virtual bool SaveGame()
override;
34 virtual bool LoadGame()
override;
38 UPROPERTY(BlueprintAssignable)
39 FOnCharacterDeath OnCharacterDeath;
44 virtual USkeletalMeshComponent* GetCharacterMesh()
const override {
return GetMesh();};
45 virtual UPrimitiveComponent*
GetPrimitiveComponent()
override {
return Cast<UPrimitiveComponent>(RootComponent);};
46 virtual void Ragdoll()
override;
47 virtual void RagdollStop()
override;
50 virtual float PlayReplicatedMontage(UAnimMontage* MontageToPlay,
const float InPlayRate = 1.0f,
const EMontagePlayReturnType ReturnValueType = EMontagePlayReturnType::Duration,
51 const float InTimeToStartMontageAt = 0.0f,
const bool bStopAllMontages =
true)
override;
53 virtual void StopReplicatedMontage(
const float InBlendOutTime,
const UAnimMontage* Montage)
override;
54 virtual bool GetCharacterHealth(
float&
Health,
float& MaxHealth)
const override;
59 virtual bool GetAudioSocketLocation(
const FName& AudioSocket, FVector&
Location)
const override;
60 virtual USceneComponent* GetThrowPoint()
const override;
62 virtual void GetThrowStats(FTransform& OutTransform, FVector& OutThrowForce)
const override;
64 virtual void CharacterModeChanged(
const FGameplayTag& NewMode)
override;
83 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Character|Skills")
84 virtual int32 GetStrength()
const{
return CharacterSkills.GetStrength();};
85 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Character|Skills")
86 virtual int32 GetPerception()
const{
return CharacterSkills.GetPerception();};
87 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Character|Skills")
88 virtual int32 GetEndurance()
const{
return CharacterSkills.GetEndurance();};
89 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Character|Skills")
90 virtual int32 GetCharisma()
const{
return CharacterSkills.GetCharisma();};
91 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Character|Skills")
92 virtual int32 GetIntelligence()
const{
return CharacterSkills.GetIntelligence();};
93 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Character|Skills")
94 virtual int32 GetAgility()
const{
return CharacterSkills.GetAgility();};
95 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Character|Skills")
96 virtual int32 GetWeaponSkill()
const{
return CharacterSkills.GetWeaponSkill();};
97 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Character|Skills")
98 virtual int32 GetStealth()
const{
return CharacterSkills.GetStealth();};
99 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Character|Skills")
100 virtual int32 GetLuck()
const{
return CharacterSkills.GetLuck();};
101 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Character|Skills")
102 virtual int32 GetSkillPoints()
const{
return CharacterSkills.GetSkillPoints();};
107 virtual void BeginPlay()
override;
110 virtual void NotifyHit(UPrimitiveComponent* MyComp, AActor*
Other, UPrimitiveComponent* OtherComp,
bool bSelfMoved, FVector HitLocation, FVector HitNormal, FVector NormalImpulse,
const FHitResult&
Hit)
override;
115 virtual void FallOver(
const float WaitTime);
116 UFUNCTION(BlueprintImplementableEvent, Category=
"Player")
117 void OnFallOver(const
float WaitTime);
118 virtual
void GetUpFromFall();
119 UFUNCTION(BlueprintImplementableEvent, Category="Player")
120 void OnGetUpFromFall();
123 void OnRep_CharacterDeath();
129 void LogDebugError(const FString& Message) const;
130 void LogDebugError(const FString& Message, const int32 Value) const;
131 void LogDebugError(const FString& Message, const
float Value) const;
132 void LogDebugWarning(const FString& Message) const;
133 void LogDebugWarning(const FString& Message, const int32 Value) const;
134 void LogDebugWarning(const FString& Message, const
float Value) const;
136 void LogDebugMessage(const FString& Message, const
bool bWarning = false, const
bool bError = false) const;
137 void LogDebugMessage(const FString& Message, const int32 Value, const
bool bWarning = false, const
bool bError = false) const;
138 void LogDebugMessage(const FString& Message, const
float Value, const
bool bWarning = false, const
bool bError = false) const;
139 void LogDebugMessage(const FString& Message, const
bool bValue, const
bool bWarning, const
bool bError) const;
140 void LogOnScreenMessage(const int32 Key, const FString& Message, FColor Color = FColor::Green) const;
142 void SetCategoryName(const FLogCategoryBase& Category){CategoryName = Category.GetCategoryName();};
144 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=
"Character|Debugging")
145 bool bDebuggingMode = false;
148 UPROPERTY(Replicated, EditAnywhere, BlueprintReadWrite, Category= "
Character|Core")
150 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Character|Core")
152 UPROPERTY(ReplicatedUsing=OnRep_CharacterDeath, EditAnywhere, BlueprintReadWrite, Category= "
Character|Core")
156 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "
Character|
Pickup")
157 float PickupThrowIntensity = 500.0f;
160 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Character|Pushing")
161 bool bCanBePushed = false;
162 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Character|Pushing")
163 float HitVelocityThreshold = 50.0f;
164 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Character|Pushing")
165 float HitVelocityMultiplier = 5.0f;
166 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Character|Pushing")
167 float HitReactionMultiplier = 0.01f;
168 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Character|Pushing")
169 bool bPushHitReaction = true;
170 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Character|Pushing")
171 bool bAddMovementInput = true;
172 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Character|Pushing")
173 bool bAddCharacterMovement = true;
175 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Character|Pushing")
176 float PushFallVelocityThreshold = 200.0f;
178 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Character|Pushing")
179 float PushedFallVelocityThreshold = 500.0f;
180 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Character|Pushing")
181 float PushedFallOverWaitTime = 2.0f;
189 UPROPERTY(VisibleAnywhere, Category="
Character|Save")
193 FLogCategoryName CategoryName = LogBaseCharacter.GetCategoryName();
199 FTimerHandle FallOverTimerHandle;