LEAP Documentation 40220
Documentation for the LEAP project
ProjectXPlayerControllerMainMenu.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2018. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "CosmeticAssetBase.h"
7#include "GameFramework/PlayerController.h"
8#include "Templates/SubclassOf.h"
9#include "SteamBeaconPlayerController.h"
10#include "ProjectXPlayerControllerMainMenu.generated.h"
11
12class UWeaponInstance;
15
16DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FSelectedCosmeticTypeSignature, ECosmeticType, Type);
17DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FSelectedWeaponSignature, TSubclassOf<UWeaponInstance>, WeaponClass);
18DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FSelectedCosmeticSignature,ECosmeticType, CosmeticType, TSubclassOf<UWeaponInstance>, WeaponClass, UCosmeticAssetBase*, CosmeticAsset);
19DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FSelectClassSignature, TSubclassOf<AProjectXCharacter>, CharacterClass);
20DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FSelectAllySignature, bool, bIsAlly);
22
23UCLASS()
24class PROJECTX_API AProjectXPlayerControllerMainMenu : public ASteamBeaconPlayerController
25{
26 GENERATED_BODY()
27protected:
28 virtual void ClientSetHUD_Implementation(TSubclassOf<AHUD> NewHUDClass) override;
29 virtual void BeginPlay() override;
30 virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
31 virtual void SetupInputComponent() override;
32 UFUNCTION(BlueprintImplementableEvent)
33 void OnCharacterClassSelected(TSubclassOf<AProjectXCharacter> CharacterClass, bool bChangeCamera = true);
34 UFUNCTION(BlueprintImplementableEvent)
35 void OnCosmeticSelected(ECosmeticType CosmeticType, TSubclassOf<UWeaponInstance> WeaponClass, UCosmeticAssetBase* CosmeticAsset, bool bChangeCamera = true);
36 UFUNCTION(BlueprintImplementableEvent)
37 void OnWeaponSelected(TSubclassOf<UWeaponInstance> WeaponClass);
38 UFUNCTION(BlueprintImplementableEvent)
39 void OnCosmeticTypeSelected(ECosmeticType Type, bool bChangeCamera = true);
40 UFUNCTION(BlueprintImplementableEvent)
41 void OnIsAllySelected(bool bIsAlly, bool bChangeCamera = true);
42
43 //Push to talk bindings
44 void PushToTalkPartyChannelPressed();
45 void PushToTalkPartyChannelReleased();
46 void PushToTogglePartyChannel();
47
48 bool bUsingPushToTalk = true;
49 //A toggle control to make sure PPT with a toggle action is correctly being tracked
50 bool bPPTToggle = false;
51
52public:
53 UPROPERTY(BlueprintAssignable)
54 FSelectedCosmeticSignature OnCosmeticSelectedEvent;
55 UPROPERTY(BlueprintAssignable)
56 FSelectedCosmeticSignature OnCosmeticDeselectedEvent;
57 UPROPERTY(BlueprintAssignable)
58 FSelectedWeaponSignature OnWeaponSelectedEvent;
59 UPROPERTY(BlueprintAssignable)
60 FSelectClassSignature OnCharacterSelectedEvent;
61 UPROPERTY(BlueprintAssignable)
62 FSelectedCosmeticTypeSignature OnCosmeticTypeSelectedEvent;
63 UPROPERTY(BlueprintAssignable)
64 FSelectAllySignature OnIsAllySelectedEvent;
65 UPROPERTY(BlueprintAssignable)
66 FVivoxVOIPSignature OnPushToTalkPressed;
67 UPROPERTY(BlueprintAssignable)
68 FVivoxVOIPSignature OnPushToTalkReleased;
69
70 UFUNCTION(BlueprintCallable)
71 void SelectWeapon(const FString& WeaponID, bool bChangeCamera = true);
72 UFUNCTION(BlueprintCallable)
73 void SelectCosmetic(ECosmeticType CosmeticType, const FString& WeaponID, UCosmeticAssetBase* CosmeticAsset, bool bChangeCamera = true);
74 UFUNCTION(BlueprintCallable)
75 void DeselectCosmetic(ECosmeticType CosmeticType, const FString& WeaponID, UCosmeticAssetBase* CosmeticAsset);
76 UFUNCTION(BlueprintCallable)
77 void SelectCharacterClass(TSubclassOf<AProjectXCharacter> CharacterClass, bool bChangeCamera = true);
78 UFUNCTION(BlueprintCallable)
79 void SelectCosmeticType(ECosmeticType CosmeticType, bool bChangeCamera = true);
80 UFUNCTION(BlueprintCallable)
81 void SelectIsAlly(bool bIsAlly, bool bChangeCamera = true);
82 UFUNCTION(BlueprintCallable)
83 bool CanUsePlayButton() const;
84};
ECosmeticType
Definition: CosmeticAssetBase.h:21
DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FSelectedCosmeticSignature, ECosmeticType, CosmeticType, TSubclassOf< UWeaponInstance >, WeaponClass, UCosmeticAssetBase *, CosmeticAsset)
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FVivoxVOIPSignature)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FSelectedCosmeticTypeSignature, ECosmeticType, Type)
Definition: ProjectXCharacter.h:128
virtual void BeginPlay() override
Definition: ProjectXCharacter.cpp:179
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override
Definition: ProjectXCharacter.cpp:1207
Definition: ProjectXPlayerControllerMainMenu.h:25
Definition: CosmeticAssetBase.h:106
Definition: WeaponInstance.h:220