Files
UnrealEngineUWP/Engine/Source/Developer/GameplayDebugger/Public/GameplayDebuggerPlayerManager.h
ben marsh 2b46ba7b94 Update copyright notices to 2019.
#rb none
#lockdown Nick.Penwarden

#ROBOMERGE-OWNER: ryan.gerleve
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 4662404 in //UE4/Main/...
#ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking)

[CL 4662413 by ben marsh in Dev-Networking branch]
2018-12-14 13:44:01 -05:00

67 lines
1.8 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "GameFramework/Actor.h"
#include "GameplayDebuggerPlayerManager.generated.h"
class AGameplayDebuggerCategoryReplicator;
class APlayerController;
class UGameplayDebuggerLocalController;
class UInputComponent;
USTRUCT()
struct FGameplayDebuggerPlayerData
{
GENERATED_USTRUCT_BODY()
UPROPERTY()
UGameplayDebuggerLocalController* Controller;
UPROPERTY()
UInputComponent* InputComponent;
UPROPERTY()
AGameplayDebuggerCategoryReplicator* Replicator;
};
UCLASS(NotBlueprintable, NotBlueprintType, notplaceable, noteditinlinenew, hidedropdown, Transient)
class AGameplayDebuggerPlayerManager : public AActor
{
GENERATED_UCLASS_BODY()
virtual void TickActor(float DeltaTime, enum ELevelTick TickType, FActorTickFunction& ThisTickFunction) override;
protected:
virtual void BeginPlay() override;
public:
virtual void EndPlay(const EEndPlayReason::Type Reason) override;
void UpdateAuthReplicators();
void RegisterReplicator(AGameplayDebuggerCategoryReplicator& Replicator);
void RefreshInputBindings(AGameplayDebuggerCategoryReplicator& Replicator);
AGameplayDebuggerCategoryReplicator* GetReplicator(const APlayerController& OwnerPC) const;
UInputComponent* GetInputComponent(const APlayerController& OwnerPC) const;
UGameplayDebuggerLocalController* GetLocalController(const APlayerController& OwnerPC) const;
const FGameplayDebuggerPlayerData* GetPlayerData(const APlayerController& OwnerPC) const;
static AGameplayDebuggerPlayerManager& GetCurrent(UWorld* World);
protected:
UPROPERTY()
TArray<FGameplayDebuggerPlayerData> PlayerData;
UPROPERTY()
TArray<AGameplayDebuggerCategoryReplicator*> PendingRegistrations;
uint32 bHasAuthority : 1;
uint32 bIsLocal : 1;
uint32 bInitialized : 1;
};