Skip to content
Snippets Groups Projects
Commit b8bd8313 authored by Philipp Schäfer's avatar Philipp Schäfer
Browse files

Added Blueprintfunctions for audiofile signal sources

parent bcf09f90
Branches
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@
#include "VAAbstractSignalSource.generated.h"
UCLASS( ClassGroup=(Custom), Abstract, meta=(BlueprintSpawnableComponent), HideDropdown, HideCategories=("Tags", "AssetUserData", "Activation", "Collision", "Cooking") )
UCLASS( ClassGroup=(VA), Abstract, meta=(BlueprintSpawnableComponent), HideDropdown, HideCategories=("Tags", "AssetUserData", "Activation", "Collision", "Cooking") )
class UVAAbstractSignalSource : public UActorComponent
{
GENERATED_BODY()
......
......@@ -150,6 +150,11 @@ bool UVAAudiofileSignalSource::GetLoop() const
return bLoop;
}
EPlayAction::Type UVAAudiofileSignalSource::GetPlayActionEnum() const
{
return EPlayAction::Type(GetPlayAction());
}
int UVAAudiofileSignalSource::GetPlayAction() const
{
if (!FVAPlugin::GetIsMaster())
......
......@@ -331,6 +331,16 @@ bool UVASourceComponent::SetSignalSourceType(TSubclassOf<UVAAbstractSignalSource
return true;
}
TSubclassOf<UVAAbstractSignalSource> UVASourceComponent::GetSignalSourceType() const
{
return SignalSourceType;
}
UVAAbstractSignalSource* UVASourceComponent::GetSignalSource() const
{
return SignalSource;
}
// ****************************************************************** //
// ******* Sound Settings ******************************************* //
......@@ -437,11 +447,6 @@ bool UVASourceComponent::GetHandleReflections() const
return bHandleReflections;
}
TSubclassOf<UVAAbstractSignalSource> UVASourceComponent::GetSignalSourceType() const
{
return SignalSourceType;
}
// ****************************************************************** //
......
......@@ -54,15 +54,23 @@ public:
// *** Setter *** //
UFUNCTION(BlueprintCallable)
bool SetLoop(bool bLoopN);
UFUNCTION(BlueprintCallable)
bool SetPlayBackPosition(float Time);
UFUNCTION(BlueprintCallable)
bool SetPlayAction(int Action);
// *** Getter *** //
UFUNCTION(BlueprintCallable)
FString GetFilename() const;
UFUNCTION(BlueprintCallable)
bool GetLoop() const;
UFUNCTION(BlueprintCallable)
EPlayAction::Type GetPlayActionEnum() const;
int GetPlayAction() const;
// *** Events/Delegates *** //
......
......@@ -145,6 +145,10 @@ public:
UFUNCTION(BlueprintCallable)
TSubclassOf<UVAAbstractSignalSource> GetSignalSourceType() const;
// Returns a pointer to the signal source component
UFUNCTION(BlueprintCallable)
UVAAbstractSignalSource* GetSignalSource() const;
// Mute sound (true = mute)
UFUNCTION(BlueprintCallable)
bool MuteSound(bool bMute = true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment