50 lines
1.3 KiB
C++
50 lines
1.3 KiB
C++
// © 2025 Naked People Team. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Components/ActorComponent.h"
|
|
#include "StatsManager.generated.h"
|
|
|
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FAttributeUpdateSignature, float, CurrentValue, float, MaxValue);
|
|
|
|
|
|
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
|
|
class NAKEDDESIRE_API UStatsManager : public UActorComponent
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
float Embarrassment = 0.0f;
|
|
float MaxEmbarrassment = 100.0f;
|
|
float Energy = 1000.0f;
|
|
float MaxEnergy = 1000.0f;
|
|
|
|
public:
|
|
UStatsManager();
|
|
|
|
protected:
|
|
virtual void BeginPlay() override;
|
|
virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
|
|
|
|
public:
|
|
float Stamina = 100.0f;
|
|
float MaxStamina = 100.0f;
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void IncreaseEmbarrassment(float Amount);
|
|
void DecreaseEmbarrassment(float Amount);
|
|
void DecreaseStamina(float Amount);
|
|
void IncreaseStamina(float Amount);
|
|
void DecreaseEnergy(float Amount);
|
|
void RestoreEnergy();
|
|
|
|
UPROPERTY(BlueprintAssignable)
|
|
FAttributeUpdateSignature EmbarrassmentUpdate;
|
|
|
|
UPROPERTY(BlueprintAssignable)
|
|
FAttributeUpdateSignature StaminaUpdate;
|
|
|
|
UPROPERTY(BlueprintAssignable)
|
|
FAttributeUpdateSignature EnergyUpdate;
|
|
};
|