2026-03-11 11:25:15 +05:30
|
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
|
#include "GameFramework/GameModeBase.h"
|
|
|
|
|
|
#include "AudioVideoRecordGameMode.generated.h"
|
|
|
|
|
|
|
2026-03-12 18:53:47 +05:30
|
|
|
|
class USoundBase;
|
|
|
|
|
|
class UAudioComponent;
|
|
|
|
|
|
|
2026-03-11 11:25:15 +05:30
|
|
|
|
/**
|
|
|
|
|
|
* Simple GameMode for a first person game
|
|
|
|
|
|
*/
|
|
|
|
|
|
UCLASS(abstract)
|
|
|
|
|
|
class AAudioVideoRecordGameMode : public AGameModeBase
|
|
|
|
|
|
{
|
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
AAudioVideoRecordGameMode();
|
2026-03-12 18:53:47 +05:30
|
|
|
|
|
|
|
|
|
|
/** 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;
|
2026-03-11 11:25:15 +05:30
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|