29 lines
836 B
C++
Executable file
29 lines
836 B
C++
Executable file
#pragma once
|
|
#include "CoreMinimal.h"
|
|
#include "Components/ActorComponent.h"
|
|
#include "Curves/CurveFloat.h"
|
|
#include "GrowthComponent.generated.h"
|
|
|
|
class USceneComponent;
|
|
|
|
UCLASS(Blueprintable, ClassGroup=Custom, meta=(BlueprintSpawnableComponent))
|
|
class UGrowthComponent : public UActorComponent {
|
|
GENERATED_BODY()
|
|
public:
|
|
private:
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, Transient, meta=(AllowPrivateAccess=true))
|
|
USceneComponent* ScaleComponent;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
|
|
FRuntimeFloatCurve CurrentGrowthCurve;
|
|
|
|
public:
|
|
UGrowthComponent();
|
|
UFUNCTION(BlueprintCallable)
|
|
void StopGrow();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void StartGrow(USceneComponent* aComponentToScale, FRuntimeFloatCurve aCurve);
|
|
|
|
};
|
|
|