5#include "CoreMinimal.h"
6#include "Components/ActorComponent.h"
7#include "VivoxPlayerComponent.generated.h"
11UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
12class PROJECTX_API UVivoxPlayerComponent :
public UActorComponent
18 UVivoxPlayerComponent();
21 virtual
void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent);
23 virtual
void TickComponent(
float DeltaTime,ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
24 virtual
void BeginPlay() override;
28 UFUNCTION(BlueprintPure)
29 bool IsUsingPushToTalk() const;
31 UPROPERTY(BlueprintAssignable)
32 FVivoxChatSignature OnPushToTalkPressed;
33 UPROPERTY(BlueprintAssignable)
34 FVivoxChatSignature OnPushToTalkReleased;
37 UFUNCTION(Reliable, Client)
38 void Client_JoinSquadVoiceChannel(const FString& SessionName, const int32 SquadID = INDEX_NONE,
bool bForceLeaveChannels = true);
39 void AttemptJoinSquadVoiceChannel(const FString SessionName, const int32 SquadID);
40 UFUNCTION(Reliable, Client)
45 void PushToTalkTeamChannelPressed();
46 void PushToTalkTeamChannelReleased();
47 void PushToToggleTeamChannel();
50 bool bPPTToggle = false;
52 FTimerHandle ClientSquadVoiceChannelJoinHandler;
53 int32 CachedSquadID = INDEX_NONE;
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FVivoxChatSignature)