45 lines
1.3 KiB
C++
Executable file
45 lines
1.3 KiB
C++
Executable file
#pragma once
|
|
#include "CoreMinimal.h"
|
|
#include "Components/ActorComponent.h"
|
|
#include "DrinkEffectComponent.generated.h"
|
|
|
|
class APlayerCharacter;
|
|
|
|
UCLASS(Blueprintable, ClassGroup=Custom, meta=(BlueprintSpawnableComponent))
|
|
class UDrinkEffectComponent : public UActorComponent {
|
|
GENERATED_BODY()
|
|
public:
|
|
protected:
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
float BeerEffectDurationSeconds;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
bool AutoDestroy;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
bool EffectIsActive;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
bool ActivatesOnlyOnceWhenDrinking;
|
|
|
|
public:
|
|
UDrinkEffectComponent();
|
|
protected:
|
|
UFUNCTION(BlueprintCallable)
|
|
void StopEffect();
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void OnStopEffect();
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void OnStartEffect(APlayerCharacter* Character);
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
static void OnChangedCharacter(APlayerCharacter* changedToCharacter, UClass* DrinkEffectClass);
|
|
|
|
public:
|
|
UFUNCTION(BlueprintCallable, BlueprintPure)
|
|
bool GetActivateOnlyWhenDrinking() const;
|
|
|
|
};
|
|
|