add a buzz timeout uproperty
This commit is contained in:
@@ -88,6 +88,8 @@ USGTouchComponent::USGTouchComponent(const FObjectInitializer& ObjectInitializer
|
||||
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
|
||||
{
|
||||
BuzzLevel = 0;
|
||||
BuzzDuration = 0.25f;
|
||||
|
||||
ForceFeedbackLevel = 100;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,10 @@ private:
|
||||
meta=(AllowPrivateAccess="false", ClampMin = "0", ClampMax = "100", UIMin = "0", UIMax = "100"))
|
||||
int32 BuzzLevel;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="SenseGlove",
|
||||
meta=(AllowPrivateAccess="false", ClampMin = "0", ClampMax = "100", UIMin = "0", UIMax = "100"))
|
||||
float BuzzDuration;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="SenseGlove",
|
||||
meta=(AllowPrivateAccess="false", ClampMin = "0", ClampMax = "100", UIMin = "0", UIMax = "100"))
|
||||
int32 ForceFeedbackLevel;
|
||||
@@ -81,6 +85,16 @@ public:
|
||||
BuzzLevel = Level;
|
||||
}
|
||||
|
||||
FORCEINLINE float GetBuzzDuration() const
|
||||
{
|
||||
return BuzzDuration;
|
||||
}
|
||||
|
||||
FORCEINLINE void SetBuzzDuration(const float Duration)
|
||||
{
|
||||
BuzzDuration = Duration;
|
||||
}
|
||||
|
||||
FORCEINLINE int32 GetForceFeedbackLevel() const
|
||||
{
|
||||
return ForceFeedbackLevel;
|
||||
|
||||
@@ -55,6 +55,16 @@ void UTouchComponentKismetLibrary::SetBuzzLevel(USGTouchComponent* TouchComponen
|
||||
TouchComponent->SetBuzzLevel(Level);
|
||||
}
|
||||
|
||||
float UTouchComponentKismetLibrary::GetBuzzDuration(const USGTouchComponent* TouchComponent)
|
||||
{
|
||||
return TouchComponent->GetBuzzDuration();
|
||||
}
|
||||
|
||||
void UTouchComponentKismetLibrary::SetBuzzDuration(USGTouchComponent* TouchComponent, const float Duration)
|
||||
{
|
||||
TouchComponent->SetBuzzDuration(Duration);
|
||||
}
|
||||
|
||||
int32 UTouchComponentKismetLibrary::GetForceFeedbackLevel(const USGTouchComponent* TouchComponent)
|
||||
{
|
||||
return TouchComponent->GetForceFeedbackLevel();
|
||||
|
||||
@@ -59,6 +59,12 @@ public:
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Touch Component")
|
||||
static void SetBuzzLevel(UPARAM(ref) USGTouchComponent* TouchComponent, int32 Level);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Touch Component")
|
||||
static float GetBuzzDuration(const USGTouchComponent* TouchComponent);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Touch Component")
|
||||
static void SetBuzzDuration(UPARAM(ref) USGTouchComponent* TouchComponent, float Duration);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Touch Component")
|
||||
static int32 GetForceFeedbackLevel(const USGTouchComponent* TouchComponent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user