A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
USoundManager Class ReferenceBlueprintable

Manager that provides functionality for managing VOs and Hint VOs. To use this class you must attach data table to StepVODataTable, struct for the data table is FSteVO. More...

#include <SoundManager.h>

Inheritance diagram for USoundManager:
[legend]

Public Member Functions

 USoundManager ()
 
 DECLARE_EVENT_HANDLER (UHintActivatedEvent)
 
 DECLARE_EVENT_HANDLER (UInitializationEvent)
 
 DECLARE_EVENT_HANDLER (UNewStepLoadedEvent)
 
 DECLARE_EVENT_HANDLER (UNewStoryLoadedEvent)
 
 DECLARE_EVENT_HANDLER (UPlaySoundEvent)
 
APlayerControllerGetPrivateOwner () const
 
USoundCue * GetSoundBasedOnStep (FText stepName, UDataTable *DataTable)
 Retrieves a sound cue based on the step name.
 
void HandleEvent (UBaseEvent *Event)
 
void OnAudioEndPlaying ()
 Called when audio playback ends.
 
void OnStepChange (FText stepName)
 Play sound based on the new step.
 
void PlaySound (USoundCue *soundToPlay)
 UFUNCTION(BlueprintCallable)
 
template<typename TEventType , typename... TInitializeArgs>
void SendEvent (TInitializeArgs... Arguments)
 
void SetPrivateOwner (APlayerController *Owner)
 

Public Attributes

UAudioComponent * AudioComponent
 UPROPERTY(BlueprintReadWrite, Category = "Components")
 
UDataTable * CurrentStepHintVODataTable
 UPROPERTY(BlueprintReadWrite, Category = "Components")
 
UDataTable * CurrentStepVODataTable
 UPROPERTY(BlueprintReadWrite, Category = "Components")
 
FOnVOEndPlaying OnVoEndPlaying
 UPROPERTY(BlueprintAssignable)
 
USoundManagerParametersDataSoundManagerParametersData
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "SoundManager")
 
TArray< UDataTable * > StepHintVODataTablesArray
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
 
TArray< UDataTable * > StepVODataTablesArray
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
 

Protected Member Functions

void HandleEvent_Impl (class UBaseEvent *Event)
 

Protected Attributes

USoundCue * ActiveSound
 UPROPERTY()
 
FText CurrentStep
 
THandlers Handlers
 

Private Types

using THandler = TFunction<void(UBaseEvent*)>
 
using THandlerKey = UClass*
 
using THandlers = std::unordered_map<THandlerKey, THandler, THandlerHash, THandlerComp>
 

Private Member Functions

 GENERATED_BODY ()
 

Private Attributes

APlayerControllerPrivateOwner
 UPROPERTY()
 

Detailed Description

Manager that provides functionality for managing VOs and Hint VOs. To use this class you must attach data table to StepVODataTable, struct for the data table is FSteVO.

UCLASS(Blueprintable)

Definition at line 93 of file SoundManager.h.

Member Typedef Documentation

◆ THandler

using UBaseManager::THandler = TFunction<void(UBaseEvent*)>
privateinherited

Definition at line 56 of file BaseManager.h.

◆ THandlerKey

using UBaseManager::THandlerKey = UClass*
privateinherited

Definition at line 55 of file BaseManager.h.

◆ THandlers

using UBaseManager::THandlers = std::unordered_map<THandlerKey, THandler, THandlerHash, THandlerComp>
privateinherited

Definition at line 74 of file BaseManager.h.

Constructor & Destructor Documentation

◆ USoundManager()

USoundManager::USoundManager ( )

Definition at line 11 of file SoundManager.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ DECLARE_EVENT_HANDLER() [1/5]

USoundManager::DECLARE_EVENT_HANDLER ( UHintActivatedEvent )

◆ DECLARE_EVENT_HANDLER() [2/5]

USoundManager::DECLARE_EVENT_HANDLER ( UInitializationEvent )

◆ DECLARE_EVENT_HANDLER() [3/5]

USoundManager::DECLARE_EVENT_HANDLER ( UNewStepLoadedEvent )

◆ DECLARE_EVENT_HANDLER() [4/5]

USoundManager::DECLARE_EVENT_HANDLER ( UNewStoryLoadedEvent )

◆ DECLARE_EVENT_HANDLER() [5/5]

USoundManager::DECLARE_EVENT_HANDLER ( UPlaySoundEvent )

◆ GENERATED_BODY()

USoundManager::GENERATED_BODY ( )
private

◆ GetPrivateOwner()

APlayerController * UBaseManager::GetPrivateOwner ( ) const
inlineinherited

Definition at line 47 of file BaseManager.h.

Here is the caller graph for this function:

◆ GetSoundBasedOnStep()

USoundCue * USoundManager::GetSoundBasedOnStep ( FText stepName,
UDataTable * DataTable )
BlueprintCallable

Retrieves a sound cue based on the step name.

Parameters
stepNameThe name of the step.
DataTableThe data table containing the sound cues.
Returns
The sound cue associated with the step name.

UFUNCTION(BlueprintCallable)

Definition at line 23 of file SoundManager.cpp.

Here is the caller graph for this function:

◆ HandleEvent()

void UBaseManager::HandleEvent ( UBaseEvent * Event)
inherited

Definition at line 11 of file BaseManager.cpp.

◆ HandleEvent_Impl()

void UBaseManager::HandleEvent_Impl ( class UBaseEvent * Event)
protectedinherited

Definition at line 24 of file BaseManager.cpp.

◆ OnAudioEndPlaying()

void USoundManager::OnAudioEndPlaying ( )

Called when audio playback ends.

UFUNCTION()

Definition at line 62 of file SoundManager.cpp.

Here is the caller graph for this function:

◆ OnStepChange()

void USoundManager::OnStepChange ( FText stepName)
BlueprintCallable

Play sound based on the new step.

Parameters
stepNameThe name of the new step.

UFUNCTION(BlueprintCallable)

Definition at line 57 of file SoundManager.cpp.

Here is the call graph for this function:

◆ PlaySound()

void USoundManager::PlaySound ( USoundCue * soundToPlay)
BlueprintCallable

UFUNCTION(BlueprintCallable)

Definition at line 48 of file SoundManager.cpp.

Here is the caller graph for this function:

◆ SendEvent()

template<typename TEventType , typename... TInitializeArgs>
void UBaseManager::SendEvent ( TInitializeArgs... Arguments)
inlineinherited

Definition at line 40 of file BaseManager.h.

◆ SetPrivateOwner()

void UBaseManager::SetPrivateOwner ( APlayerController * Owner)
inlineinherited

Definition at line 46 of file BaseManager.h.

Member Data Documentation

◆ ActiveSound

USoundCue* USoundManager::ActiveSound
protected

UPROPERTY()

Definition at line 185 of file SoundManager.h.

◆ AudioComponent

UAudioComponent* USoundManager::AudioComponent
BlueprintReadWrite

UPROPERTY(BlueprintReadWrite, Category = "Components")

Audio component used for playing sounds.

Definition at line 145 of file SoundManager.h.

◆ CurrentStep

FText USoundManager::CurrentStep
protected

Definition at line 186 of file SoundManager.h.

◆ CurrentStepHintVODataTable

UDataTable* USoundManager::CurrentStepHintVODataTable
BlueprintReadWrite

UPROPERTY(BlueprintReadWrite, Category = "Components")

Data table for the current story with step hint voice-over (VO) data.

Definition at line 174 of file SoundManager.h.

◆ CurrentStepVODataTable

UDataTable* USoundManager::CurrentStepVODataTable
BlueprintReadWrite

UPROPERTY(BlueprintReadWrite, Category = "Components")

Data table for the current story with step voice-over (VO) data.

Definition at line 169 of file SoundManager.h.

◆ Handlers

THandlers UBaseManager::Handlers
protectedinherited

Definition at line 77 of file BaseManager.h.

◆ OnVoEndPlaying

FOnVOEndPlaying USoundManager::OnVoEndPlaying
BlueprintAssignable

UPROPERTY(BlueprintAssignable)

Delegate called when voice-over (VO) playback ends.

Definition at line 179 of file SoundManager.h.

◆ PrivateOwner

APlayerController* UBaseManager::PrivateOwner
privateinherited

UPROPERTY()

Definition at line 53 of file BaseManager.h.

◆ SoundManagerParametersData

USoundManagerParametersData* USoundManager::SoundManagerParametersData
BlueprintReadWriteEditAnywhere

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "SoundManager")

Data object containing parameters for the Sound Manager. Setup this data asset if you want to have different params depending on story.

Definition at line 163 of file SoundManager.h.

◆ StepHintVODataTablesArray

TArray<UDataTable*> USoundManager::StepHintVODataTablesArray
BlueprintReadWriteEditAnywhere

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")

Array of step hint voice-over (VO) data tables for each story.

Definition at line 157 of file SoundManager.h.

◆ StepVODataTablesArray

TArray<UDataTable*> USoundManager::StepVODataTablesArray
BlueprintReadWriteEditAnywhere

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")

Array of step voice-over (VO) data tables for each story.

Definition at line 151 of file SoundManager.h.


The documentation for this class was generated from the following files: