Add initial project files and implement basic audio-visual recording functionality
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
#include "GameFramework/GameModeBase.h"
|
||||
#include "AudioVideoRecordGameMode.generated.h"
|
||||
|
||||
class USoundBase;
|
||||
class UAudioComponent;
|
||||
|
||||
/**
|
||||
* Simple GameMode for a first person game
|
||||
*/
|
||||
@@ -16,6 +19,21 @@ class AAudioVideoRecordGameMode : public AGameModeBase
|
||||
|
||||
public:
|
||||
AAudioVideoRecordGameMode();
|
||||
|
||||
/** Background music to play when the level starts. Assign in Blueprint. */
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Audio")
|
||||
USoundBase* BGMSound = nullptr;
|
||||
|
||||
/** Volume multiplier for BGM (0.0 – 1.0). */
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Audio", meta = (ClampMin = "0.0", ClampMax = "1.0"))
|
||||
float BGMVolume = 0.5f;
|
||||
|
||||
protected:
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
private:
|
||||
UPROPERTY()
|
||||
UAudioComponent* BGMAudioComponent = nullptr;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user