Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
AudioEmitterComponent.h
이 파일의 문서화 페이지로 가기
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Components/ActorComponent.h"
7#include "GameplayTagContainer.h"
8#include "AudioEmitterComponent.generated.h"
9
10class UAudioData;
11class UFMODAudioComponent;
13
14UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
15class CK_UE_API UAudioEmitterComponent : public UActorComponent
16{
17 GENERATED_BODY()
18
19public:
20 UAudioEmitterComponent();
21
22 UFUNCTION(BlueprintCallable, Category = "Audio|Tag")
23 void SetAudioData(UAudioData* InAudioData);
24
25 UFUNCTION(BlueprintCallable, Category = "Audio|Tag")
26 bool PlayAudioTag(FGameplayTag AudioTag);
27
28 UFUNCTION(BlueprintCallable, Category = "Audio|Tag")
29 bool PlayAudioTagAtLocation(FGameplayTag AudioTag, FVector Location);
30
31 UFUNCTION(BlueprintCallable, Category = "Audio|Tag")
32 bool StartLoopAudioTag(FGameplayTag AudioTag, bool bRestartIfAlreadyPlaying = false);
33
34 UFUNCTION(BlueprintCallable, Category = "Audio|Tag")
35 void StopLoopAudioTag(FGameplayTag AudioTag);
36
37 UFUNCTION(BlueprintCallable, Category = "Audio|Tag")
38 void StopAllLoopAudioTag();
39
40protected:
41 virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
42
43private:
44 UGlobalAudioSubsystem* GetAudioSubsystem() const;
45
46protected:
47 UPROPERTY(EditAnywhere, Category = "Sound")
48 TObjectPtr<UAudioData> AudioData;
49
50 UPROPERTY(Transient)
51 TMap<FGameplayTag, TObjectPtr<UFMODAudioComponent>> ActiveLoopAudioSounds;
52};
Definition AudioData.h:76
Definition GlobalAudioSubsystem.h:22