33 lines
955 B
C++
33 lines
955 B
C++
// © 2025 Naked People Team. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "CoverageObjectiveBase.h"
|
|
#include "RunNakedDistanceObjective.generated.h"
|
|
|
|
// Cover RequiredMeters on foot while fully naked AND in the run gait. Distance accrues only while that
|
|
// condition (and any constraints) hold; per-sample movement is clamped so a teleport can't satisfy it.
|
|
UCLASS(EditInlineNew, DisplayName = "Run Naked Distance")
|
|
class NAKEDDESIRE_API URunNakedDistanceObjective : public UCoverageObjectiveBase
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
virtual FText GetDescription() const override;
|
|
virtual float GetProgress() const override;
|
|
|
|
protected:
|
|
virtual void OnActivate() override;
|
|
virtual void OnDeactivate() override;
|
|
|
|
private:
|
|
void SampleDistance();
|
|
|
|
UPROPERTY(EditDefaultsOnly, meta = (ClampMin = 1))
|
|
float RequiredMeters = 50.0f;
|
|
|
|
float AccumulatedCm = 0.0f;
|
|
FVector LastLocation = FVector::ZeroVector;
|
|
FTimerHandle SampleTimer;
|
|
}; |