5#include "CoreMinimal.h"
7#include "Sound/SoundCue.h"
8#include "Engine/DataTable.h"
9#include "SoundManager.generated.h"
18 UPROPERTY(EditAnywhere, BlueprintReadOnly)
20 UPROPERTY(EditAnywhere, BlueprintReadOnly)
31 UPROPERTY(EditAnywhere, BlueprintReadOnly)
32 TArray<FText> ParametersName;
33 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
35 UPROPERTY(EditAnywhere, BlueprintReadOnly)
36 UDataTable* DependentSoundTable;
46 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Background Sound")
48 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Background Sound")
49 TArray<FText> AppropriateStoryParams;
61 UPROPERTY(EditAnywhere, BlueprintReadOnly)
92 UFUNCTION(BlueprintCallable)
93 USoundCue* GetSoundBasedOnStep(FText stepName, UDataTable* DataTable);
94 UFUNCTION(BlueprintCallable, Category = "Play Sound")
95 void PlaySound(USoundCue* soundToPlay);
100 UFUNCTION(BlueprintCallable, meta = (AdvancedDisplay = 1), Category = "Play Sound")
101 void PlayBackgroundSound(
102 USoundBase* soundToPlay,
103 float volumeMultiplier = 1.f,
104 float pitchMultiplier = 1.f,
105 float startTime = 0.f,
106 USoundConcurrency* concurrencySettings =
nullptr,
107 AActor* owningActor =
nullptr,
108 bool bIsUISound = false);
112 UFUNCTION(BlueprintCallable, Category = "Play Sound")
113 void PlaySFXSound(USoundBase* soundToPlay);
117 UFUNCTION(BlueprintCallable)
118 void OnStepChange(FText stepName);
123 void OnAudioEndPlaying();
125 UPROPERTY(BlueprintReadWrite, Category = "Components")
126 UAudioComponent* AudioComponent;
127 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
128 TArray<UDataTable*> StepVODataTablesArray;
129 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
130 TArray<UDataTable*> StepHintVODataTablesArray;
131 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (ClampMin = 0.f), Category = "SoundManager")
132 float GeneralSoundVolumeMultiplier = 1.f;
133 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (ClampMin = 0.f), Category = "SoundManager")
134 float SFXVolumeMultiplier = 1.f;
135 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "SoundManager")
138 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "SoundManager")
139 bool bPlayBackgroundSound = false;
140 UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (EditCondition="bPlayBackgroundSound", EditConditionHides="bPlayBackgroundSound"), Category = "SoundManager")
142 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, meta = (ClampMin = 0.f, EditCondition=
"bPlayBackgroundSound", EditConditionHides=
"bPlayBackgroundSound"), Category =
"SoundManager")
143 float BackgroundVolumeMultiplier = 1.f;
145 UPROPERTY(BlueprintReadWrite, Category = "Components")
146 UDataTable* CurrentStepVODataTable;
147 UPROPERTY(BlueprintReadWrite, Category = "Components")
148 UDataTable* CurrentStepHintVODataTable;
149 UPROPERTY(BlueprintAssignable)
150 FOnVOEndPlaying OnVoEndPlaying;
154 USoundCue* ActiveSound;
#define DECLARE_EVENT_HANDLER(TEvent)
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnVOEndPlaying)
It provides functionalities for handling events, sending events, and managing a private owner....
Event used to call when hint activated or deactivated.
Event called when we on init experience.
Event called when new step is loaded.
Event called when new story is loaded.
Event used to call to play sound.
Manager that provides functionality for managing VOs and Hint VOs. To use this class you must attach ...
DECLARE_EVENT_HANDLER(UNewStepLoadedEvent)
USoundCue * ActiveSound
UPROPERTY()
TArray< UDataTable * > StepVODataTablesArray
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
DECLARE_EVENT_HANDLER(UNewStoryLoadedEvent)
DECLARE_EVENT_HANDLER(UInitializationEvent)
FOnVOEndPlaying OnVoEndPlaying
UPROPERTY(BlueprintAssignable)
UAudioComponent * AudioComponent
UPROPERTY(BlueprintReadWrite, Category = "Components")
DECLARE_EVENT_HANDLER(UPlaySoundEvent)
UDataTable * CurrentStepHintVODataTable
UPROPERTY(BlueprintReadWrite, Category = "Components")
TArray< UDataTable * > StepHintVODataTablesArray
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
DECLARE_EVENT_HANDLER(UHintActivatedEvent)
USoundManagerParametersData * SoundManagerParametersData
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "SoundManager")
UDataTable * CurrentStepVODataTable
UPROPERTY(BlueprintReadWrite, Category = "Components")
Represents a data asset containing Sound Manager parameters. Setup this data asset if you want to hav...
TArray< FSoundManagerParameter > Data
UPROPERTY(EditAnywhere, BlueprintReadOnly)
Represents a parameter used by the Background Sound.
TArray< FText > AppropriateStoryParams
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Background Sound")
USoundBase * Sound
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Background Sound")
Represents a parameter used by the Sound Manager that will be passed as you load story.
int32 StoryIndex
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
TArray< FText > ParametersName
UPROPERTY(EditAnywhere, BlueprintReadOnly)
UDataTable * DependentSoundTable
UPROPERTY(EditAnywhere, BlueprintReadOnly)
Represents a Step Value Object used for storing step data in a data table.
USoundCue * SoundCue
UPROPERTY(EditAnywhere, BlueprintReadOnly)
FText StepName
UPROPERTY(EditAnywhere, BlueprintReadOnly)