Files
UnrealEngineUWP/Engine/Source/Developer/GameplayDebugger/Classes/GameplayDebuggingControllerComponent.h
Steve Robb 0756ef15b9 Delegate comparisons deprecated, lots of other associated code deprecated, and lots of warning fixups:
* Multicast delegate Add* calls now return FDelegateHandles, and Remove* calls are now all deprecated, except for a new Remove function which takes a FDelegateHandle.
* New FConsoleManager::RegisterConsoleVariableSink_Handle and UnregisterConsoleVariableSink_Handle functions which work in terms of FConsoleVariableSinkHandle.
* Timer calls which don't take FTimerHandles are deprecated.
* FTicker::AddTicker now returns an FDelegateHandle and is removed by an overloaded Remove function.
* DEFINE_ONLINE_DELEGATE* macros now define _Handle variants of the Add/Remove functions which return/take handles.
* Various other handle-based registration changes.
* Some unity build fixes.
* Some simplification of delegate code.
* Fixes for lots of existing code to use handle-based registration and unregistration.

#codereview robert.manuszewski

[CL 2400883 by Steve Robb in Main branch]
2015-01-08 09:29:27 -05:00

94 lines
2.7 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
/**
* GameplayDebuggingComponent is used to replicate debug data from server to client(s).
*/
#pragma once
#include "TimerManager.h"
#include "GameplayDebuggingTypes.h"
#include "GameplayDebugger.h"
#include "GameplayDebuggingControllerComponent.generated.h"
class AGameplayDebuggingReplicator;
UCLASS(config = Engine)
class GAMEPLAYDEBUGGER_API UGameplayDebuggingControllerComponent : public UActorComponent
{
GENERATED_UCLASS_BODY()
virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override;
virtual void BeginDestroy() override;
virtual void OnRegister() override;
void SetPlayerOwner(APlayerController* PC) { PlayerOwner = PC; }
void BindActivationKeys();
void OnActivationKeyPressed();
void OnActivationKeyReleased();
void SetActiveViews(uint32 InActiveViews);
virtual uint32 GetActiveViews();
bool IsViewActive(EAIDebugDrawDataView::Type View) const;
void EnableActiveView(EAIDebugDrawDataView::Type View, bool bEnable);
void ToggleActiveView(EAIDebugDrawDataView::Type View)
{
EnableActiveView(View, IsViewActive(View) ? false : true);
}
const FInputChord& GetActivationKey() const { return ActivationKey; }
/** periodic update of navmesh data */
void UpdateNavMeshTimer();
float GetUpdateNavMeshTimeRemaining() const;
FOnChangeEQSQuery OnNextEQSQuery;
FOnChangeEQSQuery OnPreviousEQSQuery;
protected:
UPROPERTY(Transient)
class AGameplayDebuggingHUDComponent* OnDebugAIHUD;
UPROPERTY(Transient)
class AActor* DebugAITargetActor;
UPROPERTY(Transient)
class UInputComponent* AIDebugViewInputComponent;
void OpenDebugTool();
void CloseDebugTool();
void EnableTargetSelection(bool bEnable);
bool CanToggleView();
virtual void ToggleAIDebugView_SetView0();
virtual void ToggleAIDebugView_SetView1();
virtual void ToggleAIDebugView_SetView2();
virtual void ToggleAIDebugView_SetView3();
virtual void ToggleAIDebugView_SetView4();
virtual void ToggleAIDebugView_SetView5();
virtual void ToggleAIDebugView_SetView6();
virtual void ToggleAIDebugView_SetView7();
virtual void ToggleAIDebugView_SetView8();
virtual void ToggleAIDebugView_SetView9();
virtual void NextEQSQuery();
virtual void BindAIDebugViewKeys();
AGameplayDebuggingReplicator* GetDebuggingReplicator() const;
TWeakObjectPtr<APlayerController> PlayerOwner;
/** Handle for efficient management of UpdateNavMesh timer */
FTimerHandle TimerHandle_UpdateNavMeshTimer;
FInputChord ActivationKey;
const float KeyPressActivationTime;
float ControlKeyPressedTime;
float PlayersComponentRequestTime;
uint32 bToolActivated : 1;
uint32 bWaitingForOwnersComponent : 1;
};