Fix embarrassment gain/decay not tied to NPC observation state

This commit is contained in:
2026-05-18 22:47:33 +03:00
parent a04b892fe9
commit 2c78e1660e
4 changed files with 66 additions and 7 deletions
+12
View File
@@ -19,9 +19,17 @@ class NAKEDDESIRE_API UStatsManager : public UActorComponent
float Energy = 1000.0f;
float MaxEnergy = 1000.0f;
int32 ObserverCount = 0;
public:
UStatsManager();
UPROPERTY(EditDefaultsOnly, Category = "Embarrassment")
float EmbarrassmentGainRate = 10.0f;
UPROPERTY(EditDefaultsOnly, Category = "Embarrassment")
float EmbarrassmentDecayRate = 1.0f;
protected:
virtual void BeginPlay() override;
virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
@@ -30,6 +38,10 @@ public:
float Stamina = 100.0f;
float MaxStamina = 100.0f;
// Called by NPCAIController when sight is gained or lost.
// CoverageWeight: fraction of body covered [0..1]; pass 0.0f until #05 (GetEffectiveCoverage) lands.
void SetObserved(bool bObserved, float CoverageWeight = 0.0f);
UFUNCTION(BlueprintCallable)
void IncreaseEmbarrassment(float Amount);
void DecreaseEmbarrassment(float Amount);