Added commision objectives
This commit is contained in:
@@ -3,31 +3,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "CoverageObjectiveBase.h"
|
||||
#include "TravelObjectiveBase.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.
|
||||
// condition (and any constraints) hold; the base clamps per-sample movement so a teleport can't satisfy it.
|
||||
UCLASS(EditInlineNew, DisplayName = "Run Naked Distance")
|
||||
class NAKEDDESIRE_API URunNakedDistanceObjective : public UCoverageObjectiveBase
|
||||
class NAKEDDESIRE_API URunNakedDistanceObjective : public UTravelObjectiveBase
|
||||
{
|
||||
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;
|
||||
virtual bool DoesSampleCount() const override;
|
||||
};
|
||||
Reference in New Issue
Block a user